I have a drupal site with advagg 7.x.2.17 on server A and on server B I have a cronjob where I do:
ssh SERVER_A_IP -p 22 drush -r /web-pub/site pm-disable readonlymode -y
ssh SERVER_A_IP -p 22 drush -r /web-pub/site pm-enable readonlymode -y
The enable of readonlymode takes more than 60 seconds and I get:
Fatal error: Maximum execution time of 60 seconds exceeded in /web-pub/site/sites/all/modules/contrib/features/features.export.inc on line 1090
Nowhere in my code I have set a limit of 60 seconds. In fact, I've set it to 6000 seconds.
I recursively grepped my whole site on server A using:
grep -r --include "*.php" --include "*.inc" "max_exe" /web-pub/site/ | grep 60
and I only got:
/web-pub/site/sites/all/modules/contrib/advagg/advagg_css_compress/yui/CSSMin.inc: $this->max_execution_time = 60; // 1 min
I changed that 60 to 61. Next time my cron job on server B run I got the error:
Fatal error: Maximum execution time of 61 seconds exceeded in /web-pub/site/sites/all/modules/contrib/features/features.export.inc on line 0
So, it seems that the limit that is leaking outside of that module originates from advagg's CSSMin code.
I don't know why enabling a third party module (in this case readonlymode) initiates code in the advagg, but the fact that advagg doesn't honour the time limit I've explicitly set in my settings.php seems like a problem to me.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | advagg-2762639-9-max_exec_time-cssmin.patch | 921 bytes | mikeytown2 |
Comments
Comment #2
ioannis.cherouvim commentedComment #3
ioannis.cherouvim commentedComment #4
akz commentedSubscribing
Comment #5
meltoner commentedSubscribing - this is terrible !
Comment #6
mariaioann commentedIndeed, it seems to be a bug.
Comment #7
smamalis commentedSubscribing
Comment #8
mikeytown2 commentedThanks for finding that. I'll see what I can do later on today. Expect a patch in less than 12 hours.
Comment #9
mikeytown2 commentedHere's a patch. When running from the command line the timeout is usually 0 (unlimited); looking at the code it doesn't take this into account and assumes that 60 is higher than 0 in this case.
Comment #11
mikeytown2 commentedCommitted this.
Created a pull request for this as well
https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port/pull/31