• Resolved surgimedex.webmaster

    (@surgimedexwebmaster)


    Hello,
    I am using a shared hosting server by Hostgator. Recently i noticed that my website pages were not loading and the admin login url for wordpress was also not working basically the site was down. I asked Hostgator to provide me the logs and they informed me that there server is configured to kill SQL Queries that runs longer than 20 secs and it killed below queries from the database created by wordpress after its installation. Can you guys please tell me is there something that you can do to fix it ?

    This is what hostgator has to say :

    he following error message regarding the database(s):-

    ——
    2015-08-01 03:16:53 +0000 [info] killed_thread_id:169161503 user:surgib55_wp535 host:localhost db:surgib55_wp535 command:Sleep time:24 query:
    2015-08-01 18:45:53 +0000 [info] killed_thread_id:171228710 user:surgib55_wp535 host:localhost db:surgib55_wp535 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 20 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 for the better performance of the site.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator James Huff

    (@macmanx)

    That’s way too long for any normal query to run, something is Doing It Wrong?, and just optimizing the database won’t help.

    Try deactivating all plugins. If that resolves the issue, reactivate each one individually until you find the cause.

    If that does not resolve the issue, try switching to the Twenty Fifteen theme to rule-out a theme-specific issue (theme functions can interfere like plugins).

    Hi, surgimedex.webmaster

    did you solve this issue , if u did please tell me ,How i’m heaving same issue , i’m also using hostgator

    Moderator t-p

    (@t-p)

    – try installing the Query Monitor plugin and seeing how long the queries are taking.

    Thread Starter surgimedex.webmaster

    (@surgimedexwebmaster)

    dunno what fixed the issue but i am not experiencing this issue anymore.
    it must be related to some plugin which i uninstalled eventually.not sure which plugin it was.
    Thanks.

    Moderator James Huff

    (@macmanx)

    At least it’s fixed. ??

    I am facing same problem. Please help me to solve this problem.

    Moderator t-p

    (@t-p)

    @balakrishnakini,

    If you noticed, this thread is marked “resolved”.

    If the troubleshooting already posted made no difference for you, then, as per the Forum Welcome, please post your own topic.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘MySQL Queries running for too long (Query run time >20Sec)’ is closed to new replies.