Posted on: 10/07/07 06:25am
By: muntada
I have a cron running for one site to execute the emailgeeklogstories script. I run this sucessfully on many other sites. However, the oldest site that I have running has recently been giving me the weirdest issue. It started off when it executed it emailed the story twice. Then thrice, then four times, then so on, until now everyone receives 10 copies of the e-mail. I believe the next time it does this it will send it out 11 times.
There has to be something that is not stopping the count. Any ideas on how I can put an end to this? For now, I have had to disable this feature on the site.
Re: COM_emailUserTopics()
Posted on: 10/13/07 04:07am
By: Dirk
The problem with that function is that it may run into a timeout (imposed by restrictions on the server side). When that happens, it doesn't update the "last sent" information and everyone who did get the email before the script was aborted will get it again the next time around and so on.
You can manually update the 'lastemailedstories' entry in the gl_vars table but you'll run into the same problem again after the next time the cronjob / script will be aborted.
In short, that function isn't really suitable for mass-emailing, unless you have control over script timeouts and such (which you usually don't have on shared hosting).
bye, Dirk
Re: COM_emailUserTopics()
Posted on: 10/13/07 07:41am
By: muntada
I have control. It is my own server. Do you know what specific setting I am looking to adjust?
Re: COM_emailUserTopics()
Posted on: 10/13/07 07:43am
By: Dirk
That would be "max_execution_time" in your php.ini
bye, Dirk
Re: COM_emailUserTopics()
Posted on: 10/13/07 07:55am
By: muntada
Thanks Dirk, I will experiment with what is optimal.