[wp-trac] [WordPress Trac] #34732: Memory exhaustion on posts with thousands of comments

WordPress Trac noreply at wordpress.org
Wed Nov 18 22:35:54 UTC 2015


#34732: Memory exhaustion on posts with thousands of comments
--------------------------+--------------------------
 Reporter:  pento         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.4
Component:  Comments      |     Version:  trunk
 Severity:  blocker       |  Resolution:
 Keywords:                |     Focuses:  performance
--------------------------+--------------------------

Comment (by boonebgorges):

 For the record, the purpose of #8071 was to *prevent* this from happening.

 I've just run some preliminary tests, and I've confirmed that on a vanilla
 installation, only the proper comments from the current comment-page are
 being loaded into the cache. More specifically:

 - In `comments_template()`, the `$comment_args['number']` var is being set
 from `get_option( 'comments_per_page' )`
 - This value is then passed to `WP_Comment_Query`
 - which is respected in `WP_Comment_Query->get_comment_ids()`
 - which determines what gets passed to `_prime_comment_caches()`

 @pento Could you be a dear and help to debug where things are going astray
 on wordpress.com? Some things to check:

 - The logic that `comments_template()` uses to determine comments_per_page
 has changed a bit in 4.4. Have these changes been merged properly to .com?
 :-D
 - Are there any callbacks (probably on 'pre_get_comments' or
 'parse_comment_query') doing anything weird with the default query vars?

 Without more information, it's hard to tell whether the regression is due
 to an oversight in core, or a plugin doing something wonky.

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


More information about the wp-trac mailing list