High CPU usage on shared hosting accounts

As a shared hosting customer, you may receive messages from the Smart System Notifier about high CPU usage. This article discusses possible causes and ways to resolve the issue.

Smart System Notifier messages

As a shared hosting customer, you may receive an e-mail message from us if your account's CPU usage far exceeds average CPU usage on the server. This Smart System Notifier message informs you of conditions that impact the performance and stability of your account and the server that hosts it. By informing you of these conditions early, we can work together to improve your account's performance and stability before an issue impacts the entire server.

Possible causes of high CPU usage

A simple explanation for high CPU usage is that your account's site or sites receive a lot of traffic. In other words, your site is popular, which is good news! If this is the case, please contact our Sales team to discuss possible upgrade options.

However, in other cases, high CPU usage is unintentional and caused by other factors. The following list describes some common software issues that can cause high CPU usage. Resolving these issues does not require an upgrade:

  • Running cron jobs too frequently—particularly resource-intensive cron jobs—can negatively impact server performance. Only run cron jobs as often as necessary. On shared hosting accounts, the shortest allowed interval for cron jobs is 15 minutes. You can temporarily disable any database backups or other maintenance jobs that are set up to determine if they are causing high CPU usage.
  • Comment spam on a forum or blog such as Wordpress can affect CPU usage. Check your account for any old installations that you can remove, or for comments and spam postings that look automated. On most blogs, it is possible to disable commenting. If you want to allow comments, however, you may need to implement CAPTCHA protection for your website. For more information about how to do this, please see this article.
  • Check web logs or statistics programs (such as AWStats in cPanel) for traffic patterns. Try to determine which web pages receive the most traffic, and where the traffic is coming from.
  • Search engine spiders “crawl” your website. If this occurs too frequently, performance may be affected. Please make sure that your robots.txt file contains a Crawl-delay setting of 30 seconds or higher. For example:
    User-agent: *
    Crawl-delay: 30
  • A hacked account often causes abnormal CPU usage. Make sure you use a secure password and keep all software up to date. For information about how to secure a hacked site, please see this article.
  • Make sure any MySQL queries are optimized. For more information, please see this article.
  • In the PHP switcher in cPanel, check the PHP version that you are using. For optimal performance, try using the default version if it is compatible with your software.
  • Consider enabling Cloudflare for your account in cPanel. For more information about Cloudflare, please see these articles.
  • Your CMS or e-commerce application may require optimization:

    • For information about how to optimize WordPress, please see this article.
    • For information about how to optimize PrestaShop, please see this article.
    • For information about how to optimize Drupal, please see this article.
    • For information about how to optimize Joomla, please see this article.
    • For information about how to optimize Magento, please see this article.
  • If none of the previous scenarios apply to your account, it may just be outgrowing what a shared server can handle. You should consider upgrading to one of our affordable Managed VPS plans.

Article Details

Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.

We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.