• Hey there, so I’ve had an absolute nightmare of an issue with my hosting provider, who took down my small websites due to excessive CPU usage. After much back and forth with them, they said the issue appears to be related to your plugin.

    Regarding the issue at hand, I can confirm that the main cause for the resource overuse are the numerous admin-ajax.php executions which [name] already included in his last report. The previously shown slow database queries do point towards a performance problem with your website, but they are a result of the same script execution spike.

    All of them are related to the execution of an event called scd_query_next_event. According to our checks, it is a part of the smart-countdown-fx plugin which is currently installed in your WordPress application. The problematic code in this case related to one of its widgets as shown here:

    ” add_action ( ‘wp_ajax_nopriv_scd_query_next_event’, ‘SmartCountdown_Widget::queryNextEvent’ );
    add_action ( ‘wp_ajax_scd_query_next_event’, ‘SmartCountdown_Widget::queryNextEvent’ );”

    For example, the web traffic statistics of [main site] show it had 22,514 unique visitors for September. However, even if we take only the script executions related to the scd_query_next_event task and disregard each other PHP script, we get a total of 563,059 executions up to this point:

    I’m still trying to get access to my account to disable the plugin until a fix can be made, but I thought you should know. (It’s been great up until this point!)

    Also, could your plugin affect how comments are displayed at all? On this website only (which is the only one I use it on), all of my posts display the comments for the very first post ever made on the site (4 years ago). I thought it was a problem with the SG Optimizer plugin, as it happened every time the cache was cleared, but they’re insisting it’s not, and yours is the only different plugin I can think of.

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Alex Polonski

    (@alex3493)

    Each Smart Countdown widget instance calls server via AJAX to get current events queue on each page load. This is how it works and there is nothing I can do about it. This approach supports event import plugins, so additional call to scd_query_next_event is done every time current event is over (only applies if you are using Easy Recurring Events plugin).

    If you have many counter instances on your site page scd_query_next_event calls count increases proportionally.

    Your hosting provider might have changed CPU usage policy to a more restrictive one. Just ask them. The DB query serving events queue shouldn’t be too slow, unless you are using Easy recurring plugin with a lot of short events, e.g. each 15 minutes.

    > Also, could your plugin affect how comments are displayed at all?
    No, shouldn’t be the case.

    • This reply was modified 5 years, 5 months ago by Alex Polonski.
    Thread Starter zanzaboonda

    (@zanzaboonda)

    I’m relatively new to Siteground. (Was previously with GoDaddy.) But my understanding is that this was a sudden spike that hadn’t happened previously. Unless I misunderstood.

    They are very restrictive with CPU usage (something they hadn’t disclosed before). Not knowing mutch about these things, isn’t that number still quite high? 560,000 executions for September? I only have one widget, and it’s a weekly countdown.

    Plugin Author Alex Polonski

    (@alex3493)

    I perfectly understand your doubts, and sorry about the issue. I’m not an expert in methods providers use to detect resources abuse, however I don’t think that unique visitors number really matters. The number of AJAX requests to counter plugin depends on activity of any user (new or returning) who opens your site.

    If you have counter widget visible on all pages then such request is also triggered when visitors browse your web following navigation links (e.g. go to another post or page). Depends on your web structure but think that numerous AJAX requests to counter plugin will be done during the same visitor session.

    Also total calls count is not so critical providing that these calls are spread in time more or less evenly. Maybe there was an event that motivated a lot of users to visit your web at the same time (e.g. live streaming, etc.)?

    Honestly speaking I have no advice, sorry. I have a similar plugin for Joomla (also using AJAX to get events queue) which has more installs that the WP one and this is the first time a customer reports resources abuse caused by countdown plugin.

    I will check if there is a reasonable solution for caching some AJAX responses without losing counter precision. Not sure though.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Excessive CPU usage/slow database queries + possible comments issue(?)’ is closed to new replies.