Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #989137
    Vishal
    Participant

    Hi,

    I just received an email from my hosting, Hostgator saying that some of the database queries are getting killed which is making the website slow. They have sent the following email:

    ***************

    Killed queries for the database(s):-
    —————————-
    earlypdu_wp794

    Also, the following error message regarding the database(s):-

    ——
    2016-05-13 03:24:15 +0000 [info] killed_thread_id:235410081 user:earlypdu_wp794 host:localhost db:earlypdu_wp794 command:Sleep time:26 query:
    2016-05-13 04:03:35 +0000 [info] killed_thread_id:235466148 user:earlypdu_wp794 host:localhost db:earlypdu_wp794 command:Sleep time:23 query:
    ——
    ——

    The MySQL queries for the above mentioned databases are getting killed by the server which is causing the intermittent issue with the site loading. You can verify the same from cPanel >> Health checks and Monitoring >> Mysql Killed Queries.

    Please note that, the long_query_time set for the MySQL service is 15 seconds.
    Since it is a shared server, we can’t alter this values for single domain. We have set this limit carefully to avoid any wastage/abuse of server resources and increasing the limit will result in degradation of server’s performance.

    Hence, we strongly recommend to contact your developer and optimize the database queries and PHP scripts for the better performance of the site.

    ***************

    What can/should be done in this regards?

    – Vishal

    #989186
    Rad
    Moderator

    Hi there,

    Thanks for writing in.

    That means their hosting is not WordPress optimized. Please note that plugins and themes are running on top of WordPress. And it’s WordPress that do the Query. The theme only processes the results given by WordPress.

    For example, https://codex.wordpress.org/Template_Tags/get_posts

    Theme calls get_posts() then WordPress execute the query. If you like to optimize your theme based on your hosting’s limitation. Then it’s your WordPress core files that you should edit, but that something we can’t provide support. I recommend that you switch hosting, and shared hosting is really slow.

    Thanks!

  • <script> jQuery(function($){ $("#no-reply-989137 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>