Permalink
Browse files

MDL-41254 backup Raise time and memory limit in precheck.

  • Loading branch information...
1 parent ee78814 commit 91dbb244428424e21ba455c5fea5785ff249f1df @micaherne micaherne committed Sep 2, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 backup/controller/restore_controller.class.php
View
3 backup/controller/restore_controller.class.php
@@ -335,6 +335,9 @@ public function execute_precheck($droptemptablesafter = false) {
if ($this->status != backup::STATUS_NEED_PRECHECK) {
throw new restore_controller_exception('cannot_precheck_wrong_status', $this->status);
}
+ // Basic/initial prevention against time/memory limits
+ set_time_limit(1 * 60 * 60); // 1 hour for 1 course initially granted
+ raise_memory_limit(MEMORY_EXTRA);
$this->precheck = restore_prechecks_helper::execute_prechecks($this, $droptemptablesafter);
if (!array_key_exists('errors', $this->precheck)) { // No errors, can be executed
$this->set_status(backup::STATUS_AWAITING);

0 comments on commit 91dbb24

Please sign in to comment.