[wp-trac] [WordPress Trac] #24958: Large number of revisions cause memory exhaustion

WordPress Trac noreply at wordpress.org
Mon Aug 5 17:17:59 UTC 2013


#24958: Large number of revisions cause memory exhaustion
--------------------------+-----------------------------
 Reporter:  jshreve       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Revisions     |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 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?

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24958>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list