List:Eventum General Discussion« Previous MessageNext Message »
From:Joao Prado Maia Date:May 19 2005 12:55pm
Subject:RE: Cron
View as plain text  
John, 

> Here is my cron command set to run every minute.
> 
> cd /opt/lampp/htdocs/eventum/misc; /opt/lampp/bin/php -q
> download_emails.php support 172.16.10.3 INBOX; /opt/lampp/bin/php -q
> download_emails.php --fix-lock
> 
> The reason I have set it to run every minute is that the job only
> fetches one mail at a time and then locks-up. Hence the unlock
> procedure.
> 
> Q: Is there a reason for it not fetching all the mail and locking like
> it does?
> 
> Q: If there is how do I fix it and not have a sloppy cron fix 
> like I do?
> 

Yeah, the reason is probably related to PHP's memory_limit setting. By
default it is set to 8 megabytes, I believe, so a somewhat large email
message (or even 2 small email messages) might increase the memory usage
above this limit, killing this script.

What you need to do is to remove that --fix-lock for now, to see if the
following fix will work correctly:

- open download_emails.php and add this line:

  ini_set("memory_limit", "512M");

--Joao

Thread
CronJohn Mitchell19 May
  • RE: CronJoao Prado Maia19 May
Re: Cronbart19 May
  • Re: CronElan Ruusam√§e19 May
  • RE: CronJoao Prado Maia19 May