Statistics of CPU usage of each website on shared hosting represent computing time of web server necessary for their operation. If the CPU load is too high, there are several problems that may cause it.
- Either a whole website or part of your website has high visitor count. Check the logs or visit our guide and try to figure out what part of your site is burdened.
- Website can be hacked. Look if there are any unwanted files like comments in the discussion. Check the settings in .htaccess file, there may be added lines that redirects your website etc. In the visitor statistics check from which countries the visitor’s IP addresses are from. If they are from foreign exotic countries or from similar unusual connection, it is an indication that your website can be hacked. Check your website with older backups. Change your access passwords as a precaution.
- If the visitors of your website are from legitimate sources and there is still a high CPU load, the problem may be, that the PHP application is not optimized. Check the source code and optimize it if possible.
- The problem may also occur when the database is full of spam. Any tasks for database (especially if in size of several GB) may take a long time to process, which generates higher load of the CPU as well as I/O and your website speed is slowed. Please check the tables in your databases, especially those with “comments” title, if there are any unwanted posts mostly linking to a foreign countries. These unwanted posts can be deleted and forms, from which the database is filled shall be protected with CAPTCHA or GeoIP.
- You can ask our technical support for paid analysis of your website. Our experienced administrators will advice you, where you can optimize the website’s performance and resource management.
What should you do during high CPU load?
- Enable available forms of content caching on your website.
- Consider update of PHP on higher more updated version and transfer for a newer database server. If you are using any content management system like WordPress, Joomla, or Drupal, we would also recommend to update to the newest version, for they may be quicker and more importantly provide patches for safety problems than were in previous versions.
If you check the visitor statistics and source code of your web application and the CPU load is still high, the problem may line in use of shared hosting architecture. Your hosting may endanger other hosting as well. We would ask you in this case to move your server to VPS server or dedicated physical server.