Large number of revisions cause memory exhaustion
|Reported by:||jshreve||Owned by:|
This may be a edge case, but if you have a a large number of revisions, a number of things can break.
Right now the post in question has about 1,055 revisions.
Noticeably, two things are happening:
Calling wp_update_post from a plugin fails with the following error:
PHP Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 16384 bytes) in /path/wp-includes/wp-db.php on line 1228
Using the new revisions API to view earlier revisions returns
"Sorry, something went wrong. The requested comparison could not be loaded."
and the error log contains the same memory exhaustion error.
I can seem to update from the post edit screen.
This is happening with the latest stable of 3.6 and only began happening after an update, so I suspect it's something in the new revision core/api. I haven't had a huge amount of time to investigate but my guess is it's trying to load too much revision data at one time? Maybe it should only try to load X amount of revisions at once?
Change History (14)
comment:12 nacin — 3 months ago
- Milestone changed from 3.6.1 to 3.6.2
- Priority changed from normal to low