ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Removing comments bumps server load

August 15, 2012 1:13pm

Subscribe [1]
  • #1 / Aug 15, 2012 1:13pm

    prokoudine

    12 posts

    Hi,

    The issue I’m seeing is quite a bit like http://ellislab.com/forums/viewthread/222180/.

    Basically, the server takes too much time processing a query to remove comments, while the exp_comments table currently has mere 1,512 entries.

    What I see in the typical access_log file generated by hosting is:

    85.141.143.126 myhost 0 0 [15/Aug/2012:18:25:47 +0400] POST /admin.php?S=0&D=cp&C=addons_modules&M=show_module_cp&module=comment&method=delete_comment HTTP/1.0 302 0 myhost/admin.php?S=0&D=cp&C=addons_modules&M=show_module_cp&module=comment&method=modify_comments Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.75 Safari/537.1 29520 15

    The last ‘15’ number is the time it takes to process it. There were 20 comments removed from ‘pending’ queue generated by the Low Nospam module in that case.

    If I remove mere 6 comments, this is what I get from the output profiler:

    0.0101
    SELECT *
    FROM (`exp_comments`)
    WHERE (`exp_comments`.`name` LIKE '%%' OR `exp_comments`.`email` LIKE '%%' OR `exp_comments`.`comment` LIKE '%%')
    AND `site_id` =  1
    ORDER BY `comment_date` desc

    That’s unusually lots of time for a query. Most queries are processed in the range of 0.0001 to 0.0004, with few exceptions.

    I’ve already upgraded from v2.2.2 to v2.5.2 to see of things improved; alas, no.

    It’s shared hosting with limited amount of accounts: the hoster guarantees no more than 10 accounts, and there are under 50 websites on that server (yeah, it doesn’t tell much).

    I already know the universal advice of switching to VDS or other hosting options 😊 Another solution is, of course, to use Disqus for comments, but it typically slows down rendering of a page, and that’s one area I’d rather not venture setting my feet on.

    So, is there anything else I can do to improve performance and stop annoying the hosting company? Any additional info about the setup that I could provide to shed the light on the issue?

  • #2 / Aug 16, 2012 5:48pm

    Kevin Smith

    4784 posts

    Hi prokoudine,

    Honestly, that’s not a very intensive query. If it’s taking a while to execute on your server, I’d wonder about how powerful your MySQL server is. How powerful of a hosting package are you using here?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases