After enabling notify module for 5 000+ users, there is a mistake in sending e-mails. The server sends about 300 e-mails per minute, therefore all script need about 20 minutes to send all messages.

But max execution time in my server is 600 sec (and it's a lot of - before I had 30 sec at shared hosting). So I have mistake, and only about half of e-mails are sent (other not - not in this cron run, not in other).

I propose to add new parameter to notify - how many e-mails send per 1 cycle. E.G. 100 e-mails for one time, and 5 000 e-mails will be sent in 50 cycles.

I consider this issue is common, and will become important as more and more people will use notify module.

Comments

beginner’s picture

Can you roll a patch.

If you can't, I will but I will still need your help, because I don't have the setup (the 5000 users!) to test the effectiveness of the patch.
Can you help?

Matthias Lersch’s picture

I had the same problem with 4000+ users. Solved the problem with adding this at the top of cron.php

ini_set("max_execution_time",3000);

and configred cron to run every 60 minutes, so enough for cron to finish before the next run and for notify to send 4000+ Mails while other scripts have their default max_execution_time.

This is maybe also a quick workaround for #111762: Multiple notifications sent

If you nead help in testing or developing a patch that minimizes the cron execution-time... I can help

matt2000’s picture

Status: Active » Postponed (maintainer needs more info)

@pixeltank,

Any progress on that aforementioend patch? Seems this is a somewhat frequent problem...

gisle’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

No info has been forthcoming since 2008, and ver. 5.x i s no longer supported. Time to close.