February 14th in Internet by .

Fixing CPU Exceeded errors and slow MySQL queries with Bluehost!

i often used to get cpu exceeded errors with my websites hosted with bluehost even though my sites dont get high volume of traffic. I have often noticed this while downloading backups of mysql and home directory.

This Account Has Exceeded Its CPU Quota Please contact this site’s webmaster.

If you see this error dont panic! Just wait for few minutes and your site will be back online. This is caused by excessive cpu usage or slow mysql queries caused by your website.

How to fix this problem?

The good news is you will find complete log files causing these cpu exceeded errors and what exactly is causing them. You will find these logs under your /tmp directory in bluehost cpanel pointing to the problem causing excessive cpu usage.

Just log in to your cpanel > filemanager and look these folders

/tmp/cpu_exceeded_logs
/tmp/mysql_slow_queries

and inside you will have plenty of log files generated pointing to exact problem.

The log files like below one show how many times your site had gone down and what caused the problem!

cpuexceeded.PNG

The above sample image clearly states that mysql_query is causing lot of cpu load. Now we need to know which exact mysql query is causing the problem. Go to /tmp/mysql_slow_queries folder and locate the log file as per date and time.

slowquery.PNG

Once you find out what mysql queries are slow, you will need to optimize them. Refer to this MySQL Optimization and structure the query accordingly. This will reduce future CPU consumption problems.

Note: Dont forget to check Cpanel > Process Manager and see if any php scripts consuming CPU resources. If thats the case, you will need to Kill it to bring back your site online.

Similar Posts:

One Comment

  • Amitabh Banik
    March 24, 2010

Leave A Comment.