This is part of our question and answer series, and this question is from one of the Shouter Mohit related to Hostgator placing temporary block on the database. Here is exact Email Mohit received from Hostgator hosting:
This message is to advise you of a temporary block placed on your database. The database was found to be consuming an inordinate amount of processor time, to the point of degrading overall system performance. 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. Requests to this database may become degraded by limiting the maximum number of queries or connections for a limited amount of time, or if there are sustained issues, ultimately we may be forced to block access to this database until the issue has been resolved.
Resolving this situation may be as simple as adding additional indexes to your database, optimizing the queries used, or something equally easy. If not, it may simply be a matter of moving this database to dedicated services, as it may have outgrown a shared environment.
If you believe you have a solution to this overuse, we are happy to discuss the situation with you and possibly reinstate the database on the server. Otherwise, we will be happy to assist you with the upgrade process if a dedicated server is the most appropriate solution. Thank you, and we look forward to hearing from you shortly.
Solution to Hostgator Blocking your Site Access:
First of all you need to understand, when you are on shared hosting, you are bound by the rules of the hosting company. Hostgator is a reliable hosting company, and when they put such kind of block, it’s usually because of your website is consuming more resources in terms of CPU usage, which is allowed on a shared hosting. I have couple of sites hosted on Hostgator, and I faced this issue just once in last 4 years, and recently one of my blogger friend “Karan Batra” faced the similar issue, and I helped him to fix this issue. Before I will share the fix to this problem, here are few things which you need to keep in mind:
- Hostgator is not tricking you by sending this Email, and they are not even trying to scam you by forcing you to upgrade to VPS or dedicated server plan.
- Your Website (Mostly WordPress) is consuming a lot of resources due to many reasons. It could be any bugged script, any script might be exceeding maximum execution time, mis-configured plugin or using an outdated version of WordPress or theme.
- Shifting to different shared hosting may not be an idle solution. When I faced similar issue years back, I shifted to VPS, and it didn’t solved my issue. So don’t rush into changing your hosting company.
- The solution is to identify the problem, and fix it.
- Changing hosting or upgrading to higher plan like VPS or dedicated hosting is suggested, when issue is coming due to consistent increase in traffic, and not due to your CPU usage.
- Avoid using too many scripts, and do not force html to handle server-side code (like php and shtml).
- Avoid using https protocol as much as possible; encrypting and decrypting communications is noticeably more CPU-intensive than unencrypted communications.
Contact Hostgator customer support:
Very first thing which you should do is to contact Hostgator customer support, and ask them to give you a solution on optimising your website. If you are in luck, a good tech representative, will ask you for login and will try to fix the issue himself, else you can simply ask him to whitelist your computer I.P. , so that you can work on the optimization of your site. I’m assuming you are technical, and if you not, hire someone to do the optimization of your site. In any ways, you need to whitelist the I.P. so that you or person who is working on your behalf, can login and start fixing your site. Simply Google “what is my ip”, and you will get your system I.P address, or use this website.
You should also ask Hostgator Tech support to look into your Error log, and let you know which script is consuming maximum resources, as this will be helpful for you to get quick fix.
First few quick solutions:
Take a quick backup of your WordPress database. (First and most important thing)
- Upgrade your WordPress to latest version.
- Upgrade your plugins to latest version.
- Disable and completely delete the plugins that you are not using.
- Take help of Clean options plugin, and delete all orphan tables. ( Not necessary, but it’s useful)
- Temporary revert back to default WordPress theme.
Check settings of your cache plugin:
In most of the cases, issue is because of your cache plugin is not configured properly. Go to your cache plugin settings, and check if all settings are proper or not. I mostly recommend any of these two plugins for WordPress caching:
If you believe that settings are perfect, and still the site is going down, you should shift to other cache plugin. For example; as I mentioned above, when I fixed my friend site recently, he was using W3 Total cache, and it had few bugs in earlier version, shifting to Super cache fixed the issue. (Note: Latest version of W3 total cache is perfect).
Optimize your Database:
Install Wp-optimize plugin, and get rid of post revisions, auto-draft posts, spam comments, and optimize your database. This will ensure that your database will work smoothly. You can also take help of WP Db-manager plugin to drop some of the tables which are taking too much space in database index. For example, plugins like redirections, broken link checker consume too much size. (be careful with this step, and make sure to take backup of your database).
In 80% of the cases, above solution will fix the issue and you can again contact Hostgator Support via Chat or Email to remove the temporary ban. Even if it doesn’t help your issue, here are additional things which you could do:
2nd step to fix Hosting Temporary database block problem:
Check your plugins, and remove memory consuming plugins:
I have already explained that you can use any number of plugins on your WordPress blog, until they are coded really well. A poorly coded plugin usually slows down your blog, and increase the execution time. You can install P3 Profile plugin, which checks the performance of plugins installed on your WordPress blog, and will give you an idea about which plugin is taking maximum time to execute, which plugin is consuming maximum resources. Now, all you need to do is either find an alternative to that plugin, or get rid of memory hogging plugin.
Check your WordPress theme:
Are you using year old themes? Something which you have installed years back? It’s time to install a theme, which is coded for today’s date and work well with current version of WordPress really well. If you are using a Theme like Thesis or Genesis, make sure you are running latest version of the theme. If you are using free theme or theme from any other theme provider, ensure that your theme has been updated recently. If you think, you need time to decide your new theme, simply switch back to default WordPress theme, and when hostgator removes the database and site block, you can plan on new theme.
Last but not the least, time to upgrade or Change hosting:
If nothing of these worked for you, and Hostgator team is suggesting you to upgrade to VPS or Dedicated server, it’s time for you to change your hosting or upgrade. Here are few suggested hosting, according to my experience which are good and reliable.
- Knownhost VPS or Bluehost VPS: For managed VPS, Bluehost and Knownhost are two hosting company that I can recommend. They are good and reliable. At Knownhost, you have to ask tech support team to do stuff for you, where as Bluehost VPS are more WordPress centric. Make sure, you select minimum Level 3 VPS.
- Linode for Unamanged VPS: Linode has great hardware, and if you are a technical guy and like to configure and manage your own server, Linode is recommended.
- WPEngine for Managed WordPress Hosting: If you don’t like any tech-hassles, and quality of hosting is top-priority, you should shift to WPEngine. ShoutMeLoud is hosted on WPEngine, and they are great for hosting WordPress powered sites. The only downside is they are costly, but quality comes with price. You can read my experience of moving to WPEngine over here.
Do let me know on which step your issue got resolved, or have you tried any additional step to remove database ban imposed by your Hosting. If you find this tutorial useful, consider sharing it on Facebook and Google plus.
Subscribe on Youtube
Check your domain ranking