[wp-hackers] Paged Comments and Memory Usage
David Law
wp-hackers at google-adsense-templates.co.uk
Tue Feb 14 13:35:41 UTC 2012
On Wed, 15 Feb 2012 00:00:49 +1100, you wrote:
>Moob question, do you have any cache like Wp-cache installed? That
>alone would make a huge different.
Running WP Super Cache with all reccomended settings.
Also tested plugins that interact with comments by turning them off,
same problem.
David
--
http://www.stallion-theme.com/ Stallion WordPress SEO Theme
http://www.stallion-theme.com/stallion-wordpress-seo-plugin Stallion
WordPress SEO Plugin
>On 14/02/2012, David Law <wp-hackers at google-adsense-templates.co.uk> wrote:
>> Ran into an interesting issue.
>>
>> Moved a very popular domain over the weekend from one virtual
>> dedicated server that was struggling to a new one (Centos 5.6, control
>> panel Virtualmin).
>>
>> On the old server (same basic setup) I'd changed various PHP and MySQL
>> settings, on the new one I'd not made any changes from the default
>> settings.
>>
>> The posts with above 2,000 comments (6 posts) were broken, the page
>> was loading up to where comments are loaded, so the pages were
>> truncated.
>>
>> Checked the error logs and had loads of these errors:
>>
>> [Mon Feb 13 11:03:43 2012] [error] [client *******] PHP Fatal error:
>> Allowed memory size of 33554432 bytes exhausted (tried to allocate 35
>> bytes) in /home/*******/public_html/wp-includes/comment.php on line
>> 1941, referer: **********
>>
>> Basically the comments weren't loading at all so the page was
>> truncated below the main content.
>>
>> I changed allowed memory to 64mb and the pages load now.
>>
>> I have the site set to paged comments, the post with 8,000 comments is
>> paged over 132 pages for example.
>>
>> Relevant discussion settings are:
>>
>> Enable threaded 10 levels deep
>> Break comments into pages, 20 top level
>>
>> I'd assumed WordPress would only access the comments that are loaded
>> on the page, so if I go to comments paged 27 and it's got 50 comments
>> in total only those 50 comments are accessed, but this issue suggests
>> a lot more than the comments shown in a browser are accessed and this
>> is using a lot of memory.
>>
>> Are all comments for a post accessed when a page is loaded?
>>
>> If so any ideas to reduce the load?
>>
>> I ran into a similar issue a few years back, I wanted to use the
>> <!--nextpage--> WordPress feature for a public domain books site,
>> wanted to upload entire books as a post and split them using nextpage
>> but the entire book (some books several MBs in size) was accessed each
>> page load and it would timeout.
>>
>> David
>> --
>> http://www.stallion-theme.com/ Stallion WordPress SEO Theme
>> http://www.stallion-theme.com/stallion-wordpress-seo-plugin Stallion
>> WordPress SEO Plugin
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
More information about the wp-hackers
mailing list