Support » Plugin: WordPress Popular Posts » Host disabled plugin due to excessive CPU usage and sub queries

  • mishaintheair


    Hi, rec’d this email from my hosting provider because they disabled the plugin because it was crashing the site repeatedly.

    Am I doing something wrong? Is there a possible fix? This plugin was amazing and working really well, but seems to be the source of my issues the last few weeks.

    Customer has a database called (fis1118909210684) which is causing excessive CPU usage on the server. This excessive CPU usage is due to a plugin on the WordPress called “wordpress-popular-posts.” This plugin runs subqueries which cause a significant amount of load on the server. An example of the query can be found below. Customer needs to review this plugin and determine if it is absolutely essential. It is suggested the customer remove this plugin if not needed. If the customer does need this plugin, the customer must find a way to optimize the use of this plugin so it is not issuing such expensive transactions. Customer may do this on their own or they may wish to hire a professional to do this for them. To immediately address the impact this plugin was causing the server, we have changed the permissions on this plugin to 000 at the location (html/wp-content/plugins/wordpress-popular-posts). Customer may alter the permissions of this plugin at anytime, but is likely to be netvio’ed again should they alter the perms before addressing the issue.

    Please contact the customer and advise a review of this plugin to ensure that such costly transactions are avoided.

    Problematic Query:
    SELECT p.ID AS ‘id’ , p.post_title AS ‘title’ , p.post_date AS ‘date’ , p.post_author AS ‘uid’ , v.pageviews AS ‘pageviews’ FROM (SELECT id , SUM(pageviews) AS pageviews , MAX(day) AS day FROM wp_popularpostsdatacache WHERE day > DATE_SUB(‘2013-09-16 19:36:03’ , INTERVAL 1 WEEK) GROUP BY id ORDER BY pageviews DESC , day DESC) v LEFT JOIN wp_posts p ON = p.ID WHERE p.post_type IN(‘post’ , ‘page’) AND p.ID NOT IN ( SELECT object_id FROM wp_term_relationships AS r JOIN wp_term_taxonomy AS x ON x.term_taxonomy_id = r.term_taxonomy_id JOIN wp_terms AS t ON t.term_id = x.term_id WHERE x.taxonomy = ‘category’ AND t.term_id IN(6337 , 8310 ) ) AND p.post_password = ” AND p.post_status = ‘publish’ LIMIT 10

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Hector Cabrera


    Hi there,

    Am I doing something wrong? Is there a possible fix? This plugin was amazing and working really well, but seems to be the source of my issues the last few weeks.

    No, not your fault. This plugin is a complex one and uses a lot of resources, as your host pointed out. The more features you activate (category filtering, for example), the more data WPP has to retrieve to build the list. On sites with low / medium activity the performance hit is barely noticeable, but on high-traffic sites WPP can cause issues. I’ve been working on a newer version that uses query-caching which should lower significantly the burden on the database – but it’s still far from ready and needs a lot of testing.

    So, unfortunately, at the moment you only got two choices: disable the category filtering, which will reduce the impact on your database; or disable the plugin until the new version is ready for release, which as I said might take some more time (would you like to help me test it?).



    Ahh understandable. I will try just 1 tab instead of 6 that we had.

    What would “testing” involve?

    OR…upgrade your hosting package..

    Plugin Author Hector Cabrera


    @mishaintheair version 3.0.0 seems to be stable as of now and most features are ready. Once I’m done with a couple of things I can send you the beta version so you can try it out – the caching feature I told you about should improve things a lot.

    Same problem for me.

    This plugin is a must but have desactivated it for the same reason.

    Can you send me the 3 version.

    Thank you.

    Plugin Author Hector Cabrera


    You can get it here.

    If you’re going to test it, I strongly advice you guys to make a complete backup first (including your database tables) before installing this version – v3 includes couple of changes on plugin’s database tables and you won’t be able to go back to older versions of the WPP plugin without a database backup.

    Also, be warned (as I said before) that v3 is still a work in progress. Stuff can break – hopefully not.

    I’m also seeing very high CPU rate using the plug in. My server has actually crashed a couple of times under heavy load. Any idea when the new version of the plugin will be available?

    Also do you have any tips in the mean time that could help less the load a bit?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Host disabled plugin due to excessive CPU usage and sub queries’ is closed to new replies.