setting NO memory limit for async service

This commit is contained in:
Ralf Becker 2010-08-23 16:34:00 +00:00
parent 6cc8c9d4a3
commit d3ac0f0687
2 changed files with 10 additions and 2 deletions

View File

@ -18,6 +18,7 @@ foreach(file($path_to_egroupware. '/header.inc.php') as $line)
{ {
if(preg_match("/GLOBALS\['egw_domain']\['(.*)']/", $line, $matches)) if(preg_match("/GLOBALS\['egw_domain']\['(.*)']/", $line, $matches))
{ {
system($php. ' -q -d memory_limit=64M '.$path_to_egroupware.'/phpgwapi/cron/asyncservices.php '. $matches[1]); // -d memory_limit=-1 --> no memory limit
system($php. ' -q -d memory_limit=-1 '.$path_to_egroupware.'/phpgwapi/cron/asyncservices.php '. $matches[1]);
} }
} }

View File

@ -29,6 +29,12 @@ class asyncservice
var $db; var $db;
var $db_table = 'egw_async'; var $db_table = 'egw_async';
var $debug = 0; var $debug = 0;
/**
* Line in crontab set by constructor with absolute path
*
* @var string
*/
var $cronline = '/phpgwapi/cron/asyncservices.php default';
/** /**
* constructor of the class * constructor of the class
@ -670,7 +676,8 @@ class asyncservice
{ {
$cronline .= (isset($times[$cu]) ? $times[$cu] : '*') . ' '; $cronline .= (isset($times[$cu]) ? $times[$cu] : '*') . ' ';
} }
$cronline .= $this->php.' -qC '.$this->cronline."\n"; // -d memory_limit=-1 --> no memory limit
$cronline .= $this->php.' -q -d memory_limit=-1 '.$this->cronline."\n";
//echo "<p>Installing: '$cronline'</p>\n"; //echo "<p>Installing: '$cronline'</p>\n";
fwrite($crontab,$cronline); fwrite($crontab,$cronline);
} }