Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Interestingly enough, it doesn't seem to be affecting all of our nodes, but a certain node cannot render the "Moderation" tab. It hangs for several seconds (30) and then fails.
error_log says:
[Mon Feb 24 15:30:09 2014] [error] [client 131.252.85.34] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /home/..../modules/system/image.gd.inc on line 237, referrer:
Some details:
Workbench ver 7.x-1.2
Workbench Access ver 7.x-1.2
Workbench Moderation ver 7.x-1.3
Thoughts or suggestions?
Comment | File | Size | Author |
---|---|---|---|
#6 | Screen Shot 2015-07-09 at 11.06.03 AM.png | 40.1 KB | jamesrward |
#4 | workbench_moderation-php-timeout-fix-2204341-4.patch | 1.07 KB | laughnan |
Comments
Comment #1
laughnanA temporary solution is to edit the php.ini file and set max_execution_time = 300.
I recommend maybe only loading the top 10 last moderations rather than loading every since moderation (thereby causing a longer execution time). I might look into updating some of our code to see the results.
Comment #2
laughnanThis issue needs to be addressed. Working on a patch that either limits the query result or creates some notion of pages.
Comment #3
laughnanComment #4
laughnanThis isn't the best (and probably wouldn't be something to contribute back), but at least we set a limit on the query. I think an ultimate goal would be to create pagination around this.
Comment #5
don.bliss@edmentum.com CreditAttribution: don.bliss@edmentum.com commentedbump.
Comment #6
jamesrward CreditAttribution: jamesrward commentedJust hit this issue on a site I am working on and it's quite troubling. The max execution time on the server (Acquia Cloud) is already at 300 so the resources used to hit this error where pretty huge and caused a serious slow-down. The page has a large number of drupal hosted files linked within the body and changes frequently. Even using the patch from #4 I had to crank the range down to 8 to get the moderation page to load. I think paging the results is a good first step towards avoiding this issue but I worry there is something fundamentally wrong with the way workbench moderation loads entities for the non-published versions of a page. I will do some more investigating and post back but my initial cachegrind showed more than 15K calls to entity_load for the moderation of this page.
Comment #7
iStryker CreditAttribution: iStryker commented15 000 calls does not sound good. Maybe caching a function will help. I am curious though, how many revisions are there for that node.
I did not work on this directly, but I think we had this problem at the University of Waterloo. Our solution was to only keep the last 50 revisions. We used node https://www.drupal.org/project/node_revision_delete to do this.
Comment #8
jamesrward CreditAttribution: jamesrward commentedThis patch currently on dev fixed things for us. We go from 11 minute load time to less than 1 second on one of our worst offending pages. I'm marking as a duplicate.
Comment #9
laughnanThis is amazing @jamesrward!