WordPress.org

Ready to get started?Download WordPress

Forums

Slow queries causes major problems (2 posts)

  1. MedC
    Member
    Posted 6 years ago #

    Dear WordPress Users,

    Slow queries are causing major problems on my blog. My hosting company created a PHP Resource Limit of 8, because they complained about heavy server load. This limit is exceeded continuously, so my blog is barely accessible.

    My hosting company says (translated): "The problem is that the active queries are too heavy. This is why they need a too long time to close. In the meantime people keep visiting other pages, with the consequence that there could be 8 active queries at the same time. This causes heavy server load. When the heavy queries are gone, the problem would probably solve."

    They mention the following queries:
    --------------------------------------------
    # Time: 080506 22:09:05
    # User@Host: myblog[myblog] @ localhost [127.0.0.1]
    # Query_time: 40 Lock_time: 0 Rows_sent: 18 Rows_examined: 120641
    SELECT * from wp_comments WHERE comment_approved= '1' AND comment_type = '' ORDER BY comment_date DESC LIMIT 0,18;
    # User@Host: myblog[myblog] @ localhost [127.0.0.1]
    # Query_time: 34 Lock_time: 0 Rows_sent: 18 Rows_examined: 120641
    SELECT * from wp_comments WHERE comment_approved= '1' AND comment_type = '' ORDER BY comment_date DESC LIMIT 0,18;

    # Time: 080506 22:09:08
    # User@Host: myblog[myblog] @ localhost [127.0.0.1]
    # Query_time: 32 Lock_time: 0 Rows_sent: 18 Rows_examined: 120683
    SELECT * from wp_comments WHERE comment_approved= '1' AND comment_type = '' ORDER BY comment_date DESC LIMIT 0,18;

    # Time: 080506 23:36:02
    # User@Host: myblog[myblog] @ localhost [127.0.0.1]
    # Query_time: 418 Lock_time: 0 Rows_sent: 0 Rows_examined: 120815
    use myblog_nl_-_1;
    SELECT comment_date_gmt FROM wp_comments WHERE comment_author_IP = '82.146.53.175' OR comment_author_email = 'gdmexu@yzxmgl.com' ORDER BY comment_date DESC LIMIT 1;

    # Time: 080507 5:02:45
    # User@Host: myblog[myblog] @ localhost [127.0.0.1]
    # Query_time: 36 Lock_time: 0 Rows_sent: 0 Rows_examined: 120821
    SELECT comment_date_gmt FROM wp_comments WHERE comment_author_IP = '61.133.87.226' OR comment_author_email = 'jane@mail.com' ORDER BY comment_date DESC LIMIT 1;

    # Time: 080507 5:02:48
    # User@Host: myblog[myblog] @ localhost [127.0.0.1]
    # Query_time: 45 Lock_time: 0 Rows_sent: 18 Rows_examined: 120693
    SELECT * from wp_comments WHERE comment_approved= '1' AND comment_type = '' ORDER BY comment_date DESC LIMIT 0,18;
    # User@Host: myblog[myblog] @ localhost [127.0.0.1]
    # Query_time: 57 Lock_time: 0 Rows_sent: 18 Rows_examined: 120693
    SELECT * from wp_comments WHERE comment_approved= '1' AND comment_type = '' ORDER BY comment_date DESC LIMIT 0,18;
    # User@Host: myblog[myblog] @ localhost [127.0.0.1]
    # Query_time: 55 Lock_time: 0 Rows_sent: 18 Rows_examined: 120693
    SELECT * from wp_comments WHERE comment_approved= '1' AND comment_type = '' ORDER BY comment_date DESC LIMIT 0,18;
    # User@Host: myblog[myblog] @ localhost [127.0.0.1]
    # Query_time: 41 Lock_time: 0 Rows_sent: 18 Rows_examined: 120693
    SELECT * from wp_comments WHERE comment_approved= '1' AND comment_type = '' ORDER BY comment_date DESC LIMIT 0,18;

    # Time: 080507 9:56:20
    # User@Host: myblog[myblog] @ localhost [127.0.0.1]
    # Query_time: 35 Lock_time: 0 Rows_sent: 120785 Rows_examined: 120785
    SELECT /*!40001 SQL_NO_CACHE */ * FROM wp_comments;
    # User@Host: myblog[myblog] @ localhost [127.0.0.1]
    --------------------------------------------

    Some statistics:

    Records in wp-comments table: 121.000
    Records in wp-posts table: 5.100
    Wordpress version: 2.5

    Plug-ins (the most recent versions):

    @Reply
    jQuery AJAX Comments
    wp-cache
    WP-ContactForm
    WP-Polls

    Compact Monthly Archives
    Plugin Output Cache
    Post-Plugin Library
    Recent Comments
    Recent Posts

    I would really appreciate any suggestions.

  2. france1972
    Member
    Posted 5 years ago #

    Disable recent posts. same issue as yours. that plugin is using a lot of resources creating one new query for each post displayed

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.