[Hosting] High load on the server – possible bot traffic?

Since yesterday my site started to experience heavy load. There were no significant changes made to the site, but the load increased to very high levels.

  • Aditya Shah
    • DevOps Team Lead

    Hi Karnika Yashwant

    I could see a repeating mysql query loading on your site and getting stuck for long time and most likely causing the high load on the server because of the same. The query is

    SELECT option_name, option_value FROM pol_options WHERE autoload = 'yes'

    I could see that you had a chat with Rupok today and turned off Preloading in the WP-Rocket plugin, and from then the server load looks stable.

    Hope that helps you. Please let us know if you need any further help. :slight_smile:

    Best Regards,
    Aditya Shah

  • Patrick Freitas
    • FLS

    Hi Karnika Yashwant

    Hope you are doing well.

    I checked both lines of logs:

    [17-Jun-2020 12:29:34 UTC] PHP Warning: Cannot modify header information – headers already sent in /var/web/site/public_html/wp-content/plugins/edge-cache-html-cloudflare-workers/public/class-cloudflare-edge-cache-public.php on line 120

    This is happening because the plugin sends this header:
    header('x-HTML-Edge-Cache: purgeall');

    Which probably is causing conflict to another plugin. My best guess is the Wp Rocket once it also has optmization and Cloudflare integration.

    You can contact the plugin support to check this issue or try to run a plugin conflict test until finding the one is causing the warning.

    [17-Jun-2020 12:29:29 UTC] PHP Warning: Use of undefined constant WP_ROCKET_PLUGIN_NAME - assumed 'WP_ROCKET_PLUGIN_NAME' (this will throw an Error in a future version of PHP) in /var/web/site/public_html/wp-content/plugins/wp-rocket/inc/classes/Buffer/class-cache.php on line 461

    For this line, we have a constant that is not declared on:

    "n" . '<!-- This website is like a Rocket, isn't it? Performance optimized by ' . WP_ROCKET_PLUGIN_NAME . '. Learn more: https://wp-rocket.me';

    I suggest reporting this to Wp rocket support, and they can implement a verification or declare the constant before calling it.

    As my teammate reported, most of the load seems to be coming from MySQL.

    [attachments are only viewable by logged-in members]

    Had you turned back the Pre Load cache from caching plugin?

    You can also install the Query Monitor to find which plugins are causing slow logs:
    https://wordpress.org/plugins/query-monitor/

    Let us know if you need any further help on this.
    Best Regards
    Patrick Freitas

  • Patrick Freitas
    • FLS

    Hi Karnika Yashwant

    I still see the log on Hosting > Logs

    [19-Jun-2020 18:21:16 UTC] PHP Warning: Cannot modify header information - headers already sent in /var/web/site/public_html/wp-content/plugins/edge-cache-html-cloudflare-workers/public/class-cloudflare-edge-cache-public.php on line 120

    I can see the Cloudflare cache still enabled.

    I also installed the Query Monitor, and the theme is returning different PHP warnings and an API 403 Forbidden from Composer plugin.

    Is this a premium theme? If so, I suggest contacting the theme support to check those warning.

    I kept the Query Monitor plugin, and you can check the Logs.

    Let us know if you need any further help on this.
    Best Regards
    Patrick Freitas