#24757 closed defect (bug) (fixed)
Diff timeout of 1 second is not sufficient.
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.6 | Priority: | high |
Severity: | major | Version: | 3.6 |
Component: | Revisions | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
[15-Jul-2013 05:22:54 UTC] PHP Fatal error: Maximum execution time of 1 second exceeded in /srv/www/example.com/wordpress/wp-includes/wp-diff.php on line 496
Attachments (3)
Change History (11)
#2
@
12 years ago
The default max_execution_time is 30, so 5 seems low.
We're really just trying to give the script as much time as it needs, as 30 may not be enough. One option is to give each revision a few seconds by calling set_time_limit() within the loop.
Maybe we should just do set_time_limit( 0 ) and also make sure (if we don't already) that we don't request an unreasonably high number of items at once via JS. If 30 isn't enough, then perhaps we're also requesting too many at once. Perhaps if the request times out, errors out, or takes more than X seconds, we need to cut in half the number of revisions we just tried to request.
#4
@
12 years ago
- Keywords has-patch commit added
@set_time_limit( 0 );
is unlimited so it can go in the same place as it is now, rather than inside the loop. Otherwise, +1 commit.
#5
follow-up:
↓ 7
@
12 years ago
Yeah, I saw some weird comment on php.net that suggested otherwise, but it didn't seem to make much sense, so I'm moving it back.
#6
@
12 years ago
- Owner set to markjaquith
- Resolution set to fixed
- Status changed from new to closed
In 24707:
#7
in reply to:
↑ 5
@
12 years ago
Replying to markjaquith:
Yeah, I saw some weird comment on php.net that suggested otherwise, but it didn't seem to make much sense, so I'm moving it back.
The main concern that it takes so long that the HTTP request actually times out. In that case, #24758 is our fallback.
Patch: The greater of 5 seconds or 2x the number of diffs.