Closed (fixed)
Project:
Simplenews
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
22 Sep 2009 at 09:10 UTC
Updated:
8 Dec 2009 at 22:00 UTC
Jump to comment: Most recent file
Hi all,
I´ve been using this module for 2 months without problems, constantly increasing the batch messages per cron run sent, but recently I have been receiving these watchdog logs:
100 emails sent in 1.6 seconds.
Sending interrupted: PHP maximum execution time almost exceeded. Remaining newsletters will be send during the next cron run. If this warning occurs regularly you should reduce the Cron throttle setting.
The thing is that I doubt that the max execution time is achieved (120 seconds)... any idea of how bypass this limit?
Thanks in advance.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | simplenews.584334.patch | 2.04 KB | sutharsan |
Comments
Comment #1
MWildermuth commentedI have the same problem. I believe it started after I updated to 6.14 Before that I never had this problem. Any help, anybody?
Comment #2
tengo commentedSame here. Seems like the problem started after 6.14 upgrade.
Comment #3
wkeef commentedSame here- after 6.14 upgrade.
Comment #4
MWildermuth commentedComment #5
SimonVlc commentedStill with the same problem... it started too after the 6.14 upgrade...
Comment #6
allartk commentedIt seems ini_get('max_execution_time') returns nothing on simplenews.module: 1724
Don't know why.. (but will search for it)
Comment #7
allartk commentedMore info http://drupal.org/node/193383#comment-2060262
A lazy fix:
Add on line 59:
define('SIMPLENEWS_MAX_EXECUTION_TIME', ini_get('max_execution_time'));And around line 1724 replace:
with
Better solutions are welcome :)
Comment #8
MWildermuth commentedThanks allartk! That worked. Hopefully we can get a patched version eventually.
Comment #9
encho commentedWorked here as well, thanks! It was line 1728 for me.
Comment #10
tengo commentedFix works. Line 1728 for me as well. Thanks!
Comment #11
captaindav commentedBased on everyone's verification I am taking this off the critical list.
Comment #12
captaindav commentedComment #13
sutharsan commentedWhat the code in #7 does, it captures the max_execution_time at the time when the simplenews module is loaded by PHP. Later when drupal_cron_run() is executed the max time is set to NULL. Using SIMPLENEWS_MAX_EXECUTION_TIME in the code prevents that the corrupted value us used. One problem with this approach is that when the bug in Drupal 6.14 is solved, this code does no use the 240 seconds which is set by cron. Therefore I propose the attached solution.
Comment #14
sutharsan commentedPatch committed.