If you have ever received a message like the one below, by means of which you were notified that excessive use of server resources has been detected for an extended period of time, for which they inform you that they have proceeded to suspend the service until you proceed to correct the failure in the web page (s) that are hosted on your HostGator account.
By GILBERTO ACUNA
If you ever receive an email like this … Oh Lord, please, keep calm. I hope that this article helps you to go through this situation. If you ever receive an email like the one below, I hope this guide will help you get by with the least amount of damage possible to your web pages.
Here, we share with you the guide that we followed when we were notified that our account with HostGator was suspended because of high usage of CPU. We hope it is useful for you as well.
“Automated TOS/CPU : Blocked : gator3188.hostgator.com”
“Your account … on gator3188.hostgator.com has been overusing CPU resources for an extended period of time and has been disabled in order to ensure continued performance and stability of the server. While we do limit each account to no more than 25% of a system’s CPU in our terms of service, we do not actively disable accounts until they greatly exceed that number, which is what happened in this case.”
“Unfortunately, there is no way of predicting an account’s resource usage in advance. A sudden increase in traffic, a bot crawl, or a change in site activity can cause a site to dramatically increase its resource usage in an instant. When this happens, the server’s ability to function properly is jeopardized, and we must, by necessity, restrict the source of the problem to keep the server functioning.”
“Please take a moment to review this email in full as it contains important information and resources to assist you in resolving this issue. Please note that this permanent restriction requires you take further actions to gain access to and resolve the issues on your account.”
Here are some articles that are very useful to understand the restrictions imposed by HostGator.
https://support.hostgator.com/articles/pre-sales-policies/rules-terms-of-service/cpu-resource-restriction
https://support.hostgator.com/articles/pre-sales-policies/rules-terms-of-service/cpu-resource-usage
As indicated in the email, basically what is happening is that some of the web pages that are hosted in your HostGator account, is causing excessive use of resources on the server.
Which web page? What process? That is undoubtedly the difficult thing to be able to determine, and we will have to go through a trial and error process to be able to identify the failure.
As HostGator indicates, the limit allowed is to use no more than 25% of the server’s resources, which is stipulated in the terms of service. In this case, the problem is that there is a process that is causing excessive use of the server.
HostGator offers you the following solution alternatives:
- Move the account to a dedicated server, which will allow to allocate more resources, and
- Do what is mentioned in the following guide.
https://www.hostgator.com/help/article/optimize-cpu-resource-usage
If for some reason you have already done these activities before, then it may be time to migrate to a plan that offers you more hardware resources.
The first thing to do is request access from your IP so you can fix the problem (s). To determine your IP, simply go to the following web page: http://www.hostgator.com/ip.shtml. If your IP changes constantly, you can tell them to enable the service with restrictions based on password.
Plugins often perform tasks quite inefficiently, leading to excessive CPU usage, so the recommendation is to disable all plugins and themes 100% on all web pages hosted in your account.
Next, one by one, you will need to update plugin by plugin, theme by theme, and just enable the ones that you really need. Other than that, I would recommend deleting all unnecessary plugins.
Caching is highly recommended, so in this case, HostGator recommends using WordPress Super Cache plugin, which generates static HTML pages from a dynamic blog, and when caching is enabled, it is displayed to visitors, instead of dynamic pages using less resources from the server where the webpage is hosted.
Please refer to the following article for more information and how to setup this plugin:
https://www.hostgator.com/help/article/wp-super-cache-plugin
Always is very important to keep your webpage with the latest versions of WordPress and PHP, so in this case, I would recomend to go ahead and install the latest updated for both.
All search engine crawlers in relation to robots.txt to restrict crawling on certain pages. It is very important to set a limit on web crawling your website, because it is one of the most important reasons your server may be running with high usage of CPU.
Additional steps may be necessary to limit how often Googlebot and Bingbot crawl your website.
Please refer to the following articles:
https://www.hostgator.com/help/article/how-to-use-robots-txt
https://www.hostgator.com/help/article/telling-google-how-often-to-crawl-your-website
https://www.hostgator.com/help/article/telling-the-bing-network-how-often-to-crawl-your-website
A Cron Job is a utility program that can be scheduled for performing certain specific tasks, at a specific time on the server. There is a high possibility that these tasks could be running out of control or not in an efficient way, so it is better to have the Cron Jobs to be performed by the server itself instead of WordPress, which is not the best way to do it.
You can read the following guide on how to setup these Cron Jobs for each of your web pages.
https://www.hostgator.com/help/article/how-to-replace-wordpress-cron-with-a-real-cron-job
Here I share how I responded, requesting the restoration of the service. Obviously, each of these activities is carried out with the highest level of detail possible.
TO WHOM IT MAY CONCERN:
We have proceeded to update all the websites that are hosted in our shared package ID 1234567, and we have made the following changes to them:
- We updated all plugins and themes to the latest version
- We deactivated all unnecessary plugins and themes in WordPress
- We installed and configured the WP Super Cache plugin to speed up web pages
- We updated to the latest version of WordPress 5.7.1
- We updated PHP to the latest version 7.3 and 7.4
- We limit the crawl rate on Google as indicated here: https://www.hostgator.com/help/article/telling-google-how-often-to-crawl-your-website
- We replaced WP_Cron with Server Cron for all domains, as indicated here:
https://www.hostgator.com/help/article/how-to-replace-wordpress-cron-with-a-real-cron-job
Please consider removing the restrictions imposed on our account and in the same way, I would appreciate if you would inform me of the steps to follow to update the hosting package from shared to cloud.
Thank you very much for your time.
Sincerely,
Your Name
Once you finished, and hopefully HostGator has approved that your websites are in good shape, your service can be restablished back to normal. However, we still need to know what was the reason that caused the crash. That is forensic, so I still think that the following days you may continue doing some research about what webpage, plugin, theme, Google bot, Cron Job, WordPress or PHP, could be accountable for that.
In my case, I found that one of the webpages had the following suspicious behavior.
So it is very important if you can find what exactly caused the crash, so you can prevent from happening again.