[wp-trac] [WordPress Trac] #34560: Server error after saving many revisions

WordPress Trac noreply at wordpress.org
Wed Nov 4 22:55:18 UTC 2015


#34560: Server error after saving many revisions
-------------------------------------------------+-------------------------
 Reporter:  pdfernhout                           |       Owner:
     Type:  defect (bug)                         |  adamsilverstein
 Priority:  normal                               |      Status:  assigned
Component:  Editor                               |   Milestone:  Future
 Severity:  major                                |  Release
 Keywords:  needs-unit-tests has-patch dev-      |     Version:  3.6
  feedback needs-testing                         |  Resolution:
                                                 |     Focuses:
-------------------------------------------------+-------------------------

Comment (by pdfernhout):

 Yes, I'm suspicious that the autosave call in
 [https://github.com/WordPress/WordPress/blob/4.3-branch/wp-admin/edit-
 form-advanced.php edit-form-advanced.php (4.3.1)] could be contributing to
 this as the third call to wp_get_post_revisions; from that file:
 {{{
 $autosave = wp_get_post_autosave( $post_ID );
 }}}

 And from the
 [[https://developer.wordpress.org/reference/functions/wp_get_post_autosave/
 autosave] code in [https://github.com/WordPress/WordPress/blob/4.3-branch
 /wp-includes/revision.php "wp-includes/revision.php"]:
 {{{
 function wp_get_post_autosave( $post_id, $user_id = 0 ) {
     $revisions = wp_get_post_revisions( $post_id, array( 'check_enabled'
 => false ) );

     foreach ( $revisions as $revision ) {
         if ( false !== strpos( $revision->post_name, "{$post_id}-autosave"
 ) ) {
             if ( $user_id && $user_id != $revision->post_author )
                 continue;

             return $revision;
         }
     }
 }}}

 Thanks for the pointers to other things to look at @miqrogroove. There may
 perhaps still be other such calls to functions you list that get made
 under various circumstances in the editor.

 It's a tribute to how much people love WordPress that this inefficiency
 has been lived with for so long, since this peak resource demand may
 increase routine server costs (like with a VPS often chosen by maximum
 memory) to avoid server errors when editing in edge cases. :-) Either
 that, or people like me who write long rambling autobiographical pages
 with lots of revisions are thankfully rare. :-)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34560#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list