From: skodak Date: Wed, 14 Feb 2007 20:46:38 +0000 (+0000) Subject: MDL-8469 increase memory limit everywhere due to changed calculation of used memory... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=4eefee9779322b93a8f16292569f4f12e13634bc;p=moodle.git MDL-8469 increase memory limit everywhere due to changed calculation of used memory in PHP 5.2.x - the real memory useage is the same, but the reported size of used memory is now more accurate --- diff --git a/admin/cron.php b/admin/cron.php index 47dfd097a2..9c27ba85b8 100644 --- a/admin/cron.php +++ b/admin/cron.php @@ -78,6 +78,9 @@ /// no more headers and buffers while(@ob_end_flush()); +/// increase memory limit (PHP 5.2 does different calculation, we need more memory now) + @raise_memory_limit('128M'); + /// Start output log $timenow = time(); @@ -251,7 +254,7 @@ //Execute backup's cron //Perhaps a long time and memory could help in large sites @set_time_limit(0); - @raise_memory_limit("128M"); + @raise_memory_limit("196M"); if (function_exists('apache_child_terminate')) { // if we are running from Apache, give httpd a hint that // it can recycle the process after it's done. Apache's diff --git a/admin/uploaduser.php b/admin/uploaduser.php index c8a4b3d9b4..6ee1b67f20 100755 --- a/admin/uploaduser.php +++ b/admin/uploaduser.php @@ -62,7 +62,7 @@ if ($um->preprocess_files() && confirm_sesskey()) { // that we'll take longer, and that the process should be recycled soon // to free up memory. @set_time_limit(0); - @raise_memory_limit("128M"); + @raise_memory_limit("196M"); if (function_exists('apache_child_terminate')) { @apache_child_terminate(); } diff --git a/backup/backup.php b/backup/backup.php index 379f62185f..726b42ad4b 100644 --- a/backup/backup.php +++ b/backup/backup.php @@ -111,7 +111,7 @@ //Adjust some php variables to the execution of this script @ini_set("max_execution_time","3000"); - raise_memory_limit("128M"); + raise_memory_limit("196M"); //Call the form, depending the step we are if (!$launch) { diff --git a/backup/lib.php b/backup/lib.php index 23b9d31664..295cbdfbbd 100644 --- a/backup/lib.php +++ b/backup/lib.php @@ -658,7 +658,7 @@ } @ini_set("max_execution_time","3000"); - raise_memory_limit("128M"); + raise_memory_limit("196M"); if (!$backup_unique_code = restore_precheck($destinationcourse,$pathtofile,$errorstr,true)) { mtrace($debuginfo.'Failed restore_precheck (error was '.$errorstr.')'); diff --git a/backup/restore.php b/backup/restore.php index cbd2cf0d58..0cd1887e9f 100644 --- a/backup/restore.php +++ b/backup/restore.php @@ -132,7 +132,7 @@ //Adjust some php variables to the execution of this script @ini_set("max_execution_time","3000"); - raise_memory_limit("128M"); + raise_memory_limit("196M"); //Call the form, depending the step we are diff --git a/backup/try.php b/backup/try.php index 967feffe3a..9ce12ae5dc 100644 --- a/backup/try.php +++ b/backup/try.php @@ -19,7 +19,7 @@ //Adjust some php variables to the execution of this script @ini_set("max_execution_time","3000"); - raise_memory_limit("128M"); + raise_memory_limit("196M"); echo "
\n";
 
diff --git a/lib/setup.php b/lib/setup.php
index 995eb3194a..74405d6115 100644
--- a/lib/setup.php
+++ b/lib/setup.php
@@ -182,7 +182,7 @@ global $HTTPSPAGEREQUIRED;
     }
 
 /// Increase memory limits if possible
-    raise_memory_limit('64M');    // We should never NEED this much but just in case...
+    raise_memory_limit('96M');    // We should never NEED this much but just in case...
 
 /// Load up standard libraries
 
diff --git a/mod/data/import.php b/mod/data/import.php
index ef0f929eea..53a82644aa 100755
--- a/mod/data/import.php
+++ b/mod/data/import.php
@@ -99,7 +99,7 @@
         // that we'll take longer, and that the process should be recycled soon
         // to free up memory.
         @set_time_limit(0);
-        @raise_memory_limit("64M");
+        @raise_memory_limit("96M");
         if (function_exists('apache_child_terminate')) {
             @apache_child_terminate();
         }