Author Topic

John Smith

Thursday 11 February 2010 2:19:59 am

Comment57032

Hi Nicolas,

Thanks for your kind explanation. Actually I was in the impression that if I change the memory limit to 256M in php.ini, the CLI version of php will pick it. So from where CLI version of PHP is picking the value of 32M.?

As I said cronjob is running at every 5th minute of an hour for different websites. Yesterday I got the error one time during the mid day for website2 (see below), other wise it is running fine. Is it worth changing the cronjob to the following:

10 * * * * cd /var/www/xxxx/xxxxx/website1; /usr/bin/php -dmemory_limit=128M -C runcronjobs.php frequent 2>&1

15 * * * * cd /var/www/xxxx/xxxxx/website2; /usr/bin/php -dmemory_limit=128M -C runcronjobs.php frequent 2>&1

20 * * * * cd /var/www/xxxx/xxxxx/website3; /usr/bin/php -dmemory_limit=128M -C runcronjobs.php frequent 2>&1

25 * * * * cd /var/www/xxxx/xxxxx/website4; /usr/bin/php -dmemory_limit=128M -C runcronjobs.php frequent 2>&1

By doing these I will be allocating massive amount of memory resources towards runcronjobs every 5th minute of an hour. Is it worth?