Home » Tutorials » How To Stop HostGator Email From Using Up Your CPU Processes

How To Stop HostGator Email From Using Up Your CPU Processes

Internal Server Error 500

If you use HostGator for your email services, you run the risk of taking your own websites down every time to check your email using IMAP. This is because due to HostGator’s policy on CPU processes, you can only have 25 things running at a time. Processes can be anything from a user accessing your website, downloading IMAP emails from the server, or using cPanel to access your databases. Processes for loading websites are often opened and closed within a couple of seconds, but IMAP connections will hang open until they are closed or time out. If you have certain settings turned on in your email client, you can have up to 2 processes running at a time per email account per computer. So if you are like me and have your HostGator email accounts set up on your smartphone, desktop, and laptop, that’s 6 times the amount of email accounts you have set up – in my case, that would be 3. So at any given moment, I could have 18 open processes just for my IMAP accounts. If you get to 25 (or exceed 25), HostGator will bring down your website with a 500 error until the processes are closed.

Internal Server Error 500

There are many ways to close the processes, but not every way is convenient or feasible. Follow along with me throughout this whole article because I promise this will solve your problems.

Manually Kill The Processes In cPanel

Host Gator Processes

When I called HostGator’s support the first time my websites went down with a 500 server error, I had no idea what was going on. They advised me to log into my cPanel account and kill the processes manually. To do this, you will want to look for the widget located on the left sidebar of your account that shows the amount of processes currently running. Click on “View All Processes” and click the “X” next to each one to kill it manually. This works quite well, but it’s really annoying to have to do all the time.

IMAP Accounts

In the case that you can’t access your cPanel because it’s down from a 500 error as well, try the next step I am about to mention.

Close Your Email Client

Because these processes are being caused by software programs like Microsoft Outlook or Apple Mail, you can easily kill all open processes by simply closing the program. If closing your email client does not work, you can always try shutting off your internet connection or shutting down your computer momentarily until the processes have time to kill.

Change Your Email Client Settings

Outlook Settings

Although closing out our email client will kill all open IMAP connections, having Microsoft Outlook closed all the time defeats the purpose of using a mail client. What’s great about Apple Mail, Outlook, and other clients is the availability of advanced settings. If you go into the settings of your IMAP email account within your mail client, make sure you are only checking for mail every 20 minutes or so. Also, you will want to turn IMAP IDLE off because this feature keeps the connection with the server always on and will simply load up the amount of processes you are using.

Make sure you dig around in all of the settings within your mail application. I know iOS devices use a feature called “Push” that keeps the connections always on, so turn that off. Microsoft Outlook uses scheduling in addition to IMAP syncing, so make sure you have the scheduled tasks turned off.

Use a Different Email Service

Although HostGator’s web hosting is excellent and I recommend them 100%, this whole email issue can be overwhelming for some users. If you are one of those people who just wants everything to work as planned, I would suggest using Outlook.com or Google Apps to host your email accounts. This will allow you to continue using HostGator to host your websites, but your emails will be processed through an external server, thus making the load less on your shared or VPS HostGator account.

Don’t Miss: How To Configure Your Email With Outlook.com

Use a Cron Job To Kill The IMAP Processes

As I was browsing the HostGator forums to find ways to cure this madness, I found a thread that suggested using Cron commands to kill your IMAP connections every so often. For those of you who do not know, Cron commands are basically jobs that your server will do automatically such as making a backup of your websites, sending you emails, etc. Setting up Cron jobs in cPanel is very easy and I recommend using the settings I have below:

Cron Commands

At the bottom of your cPanel, you will want to go into Cron Jobs which is found under the “Advanced” category at the bottom of the page. Use the command

/usr/bin/kill imap

and make it repeat every 5 minutes or so. This will allow your mail client to run normally, but your server will kill every IMAP connection every five minutes. Using this method is the most efficient way of controlling your processes. If you get up to 18 processes or so, you can be sure that after 5 minutes your server will kill them all automatically and you will start back at zero.

What About You?

As far as I know, these are the only ways to limit the amount of processes on your HostGator account when using your IMAP email accounts. If you have more that you would like to suggest, you would like to make a change to something I said, or simply comment on something, I will see you in the comments section below!

Please follow and like us:

58 thoughts on “How To Stop HostGator Email From Using Up Your CPU Processes

  1. I’m still having the TOS CPU usage issue from HostGator. I got 30-50 emails IDLE, should I reduce the time on Cron Jobs into 1 minute? To kill imap? Thanks.

  2. Hey Alejandro. You’ll need to change your cPanel skin to the default Host Gator one, then you’ll see the processes on the sidebar.

    Also, if you do set up a cron job, set it for no more than once every 15-minutes, otherwise, they’ll throttle you down.

  3. Thanks for sharing this great content! I wonder where can I find the process tab in my Hostgator CPanel. I couldn’t find it in the left side sidebar. Do you think I should upgrade to a VPS having 6 websites and 7 emails in total with a Baby Croc plan?

  4. I recently had to do this. I thought I set my setting to run every 5 minutes (we have four people using email on HostGator via our various domains).

    However, our site went down today, and when I checked on the cron job, I noticed that it was set to run every 24 minutes. Has anyone else experienced this backend change by HostGator? I’ll be monitoring it to see if it changes again.

  5. Robert, THANK YOU for the tip! Such an annoying problem to deal with and I’ve tried all the “usual” fixes to no avail. Hopefully, it will work for me. Thanks again for sharing.

  6. I’ve just this second come off from Chat with Hostgator. I was told this syntax was incorrect /usr/bin/kill imap which is why the cron job wasnt running.

    Oddly it ran just fine on the previous HG server before the migrated us in the blink of an eye.

    Anyone with suggestions of how to tweak this /usr/bin/kill imap welcome as HG said they couldn’t advise on BASH commands

  7. Excellent post thank you as I just set cron job to kill imap processes for my site http://www.cryofx.comas it goes down multiple times a day just from my email clients. I wanted to ask, can I set the cron job to kill every 1 minute or 2 minutes this way the down time (if any) is very minimal?

  8. I use a smartphone, tablet, and one laptop which are all set to retrieve mail from 3-4 different Hostgator IMAP accounts and now my site is continually down with the “Internal Server Error” issue. The process limit BS is too much. I’m disgusted with Hostgator that they could do this and recommend to everyone DO NOT USE HOSTGATOR! I am going back to Dreamhost which has VASTLY BETTER service.

  9. In your cron example, you have a 5 listed in the minutes bow. This will cause the cron to run every hour 5 minutes after the hour (1:05, 2:05, etc). To have the cron run every 5 minutes of every hour, one needs to enter */5 in the minutes section of the cron. This will cause the cron to run at 1:00, 1:05, 1:10, etc…

  10. Is your script executing on the five minute mark of every hour? I think (by powers of deduction) this would be every 5 minutes. */5
    Also, I editted the script to every 7 minutes to lessen the chance that the two operations might occur simultaneously and cause an error.

  11. Thanks for the solution. After chatting with the Hostgator staff I suggested they add this to their docs. Do other hosting providers limit the number of processes on shared hosting plans?

  12. Thank you for this. I’d just started running into that 500 error, and didn’t know how to fix it at all. I’ve now set a cron job as you suggest.

  13. Thanks for all the details. I have my site with hostgator and I recently hit this 500 internal server error. I use other services for email. In my case issue took place due to some backup plugins in wordpress which ate up all server resources.
    http://dealspitara.com is my site where I hit these issues.

  14. You can’t run a cron job on Hostgator more than every 15 minutes. Setting a cronjob to every 5 minutes will just get you suspended when HG eventually realizes what you are doing. No idea if 15 minutes is enough to avoid the whole IMAP load issue though.

    1. First I’ve heard of this limit. If it’s an issue, why do they even allow you to choose 5 minutes as an option in the drop down?

  15. Thanks for the post … but actually I have still 2 issues (probably bugs) with Outlook 2011 Mac – Latest version 14.3.1:
    – In the HostGator’s email account “Advanced – Server” tab, if I take out “Use IMAP IDLE…” then Outlook still takes 3 to 4 processes (IMAP cwd@xxxxx ). Only quitting Outlook kills them.
    – If I take out “Sync all IMAP…” then when I do “Send & Received All” … my “Inbox” will only show the one of my several email accounts. If I quit Outlook and open it again … all my emails accounts are back. This is probably a bug in Outlook.
    Is this happening also to someone else ?
    So I do not have a solution yet about this issue beside moving to pop or upgrading my HostGator account to VSP.
    An

  16. Very, Very, Very usefull information. It was getting crazy. I tried everything I could do to resolve this. So, I found your post. Thank you very much. I hope the Hostgator support has access to this information as well.

    Have I thanked you enough? I don’t think so. Thank you again.

  17. Thanks for the tip. I have some personal sites on Hostgator and I had no idea my email use could take down all of them. Hopefully the cronjob will solve it.

    1. Thanks for informative share! We stumbled upon this article as we’re having an issue with a client site and behold, it was the Outlook checking emails too often in the Account > Advanced settings. Once changed, no server issues.

  18. Thank you for this detailed post regarding a deficiency with this host. We stumbled upon this article as we’re having an issue with a client site and behold, it was the Outlook checking emails too often in the Account > Advanced settings. Once changed, no server issues.

    1. I’m glad it worked. This is something HostGator needs to share with customers whenever they are setting up an email address so you don’t have to go through all this confusion.

  19. These are the things you encounter when you go for shared hosting. I really need to change things up a bit. Thanks for this very informative article!

  20. i started with 2 wordpress sites an 10 emails with Baby Plan, then I grow up to 12 wordpress sites and 200 emails, of course i reach the 25 process limit (imap/pop) and sites goes down 3 times on a day. I considering to switch to VPS but theres 9 Levels so i don´t know how to choose on HostGator or move to Rackspace or MediaTemple ?

    1. With that many emails, I’m surprised your websites aren’t down all day. I would suggest calling Host Gator and talking to their sales representatives about which plan is best for you. I would get a higher level plan of VPS or dedicated hosting. Call Host Gator though. They will be able go assess your account see what the best thing to do is.

    1. My HostGator Baby plan expires in March 2013, so I may switch to either a HostGator VPS option or VPS with another company – I’m not sure yet. Either way, plans normally start at $15 to $20 a month for the most basic server.

  21. Thanks for this guide, I just tried using the command you mentioned and works like a charm 🙂 It’s true though that you need to do it every 5 mins. Thanks!

    1. If you don’t do it every 5 minutes, your website will still go down every once in a while. If you ever upgrade to VPS or dedicated hosting, you should not need that command anymore.

  22. Wow, I did not know about the fact that HostGator takes down your websites every time they check your email with the use of IMAP. Thanks to your post here on how to manually kill the processes in cPanel, it would eliminate the need to call HostGator’s customer service when this happens to any blogger’s websites that use shared hosting. I guess it is wise to use a different email service if this issue becomes troublesome to the blogger.

    1. Yeah. I’m a big fan of the command to kill the processes automatically every 5 minutes, but even still I notice that my website still goes down from too many processes. Eventually I will upgrade to VPS hosting and this problem will go away, but it’s a pain for the time being.

  23. You’ve laid out all the points regarding this topic. It sucks I have to transfer everything because me and shared hosting – we’re not working!

    1. Check out the comment I left Veronica above… I may be switching to VPS in March or sometime soon. Shared hosting is great, but I’m running 6 WordPress sites and 3 email accounts on a HostGator Baby plan so it can easily get overloaded.

      1. well! I’m a big fan of the command to kill the processes automatically every 5 minutes, but even still I notice that my website still goes down from too many processes. Eventually I will upgrade to VPS hosting and this problem will go away, but it’s a pain for the time being.

    1. I’m planning on upgrading to VPS in the future but I am making about $35 a month from my blog currently, so spending $30 a month on VPS hosting would be pointless. My Host Gator plan expires in March 2013, so I may upgrade then.

  24. Hey Ian,
    This is indeed a serious trouble that crops up when one used Hostgator. This post provides the step by step procedure to avert the problem. Thanks for this valuable insight.

    1. You’re very welcome. HostGator is a great web host, but they need an easy way for customers to manage their email. Of course, you can upgrade to VPS or dedicated servers to get rid of this problem, but not everybody can afford that amount of power.

  25. Thanks for the heads up, I never really thought that I could stop these processes manually. I will definitely consider using my other email provider to significantly lessen the load. Great Job!

    1. Using another email provider is honestly the easiest way. However, using the server commands to kill the processes every 5 minutes has been working great for me!

  26. IMAP makes it easier to view mail from home, work, and other locations- because it leaves all of your messages on the central mail server, you can view these messages from any location with Internet access.
    Nice post-sure to help a lot of people.

    1. That’s exactly why I use IMAP. I would use POP because that would eliminate this entire problem of server downtime, but with POP you have to delete the message on all devices (smartphone, laptop, desktop, and HostGator server) so IMAP makes it much easier.

  27. . IMAP connections are the main cause.of that prob.it can make some causes which makes some error.I don’t know so much about this issue but I think this post have explained a lot.
    I am only say that a lot of thank you.

  28. Yeah but my site has never been off for up to a minute though and I have a client with very active use of emails and pop keeps it simple.

    VPS will be my next option but not this moment.

    1. If your site has never been down for more than a minute or so, the problem might be too many users trying to access the site at once. In this case, HostGator recommends upgrading to VPS. However, if it’s not happening all the time, I would not spend the extra money yet.

    1. POP is inferior to IMAP because it doesn’t sync across all devices properly. I would suggest adding the command to your cPanel that I mentioned in this post. It has helped me a lot since I have added it. Even if you go over, your website will only be down for a maximum of 5 minutes because it will automatically kill the open processes. You could always upgrade to VPS or dedicated servers, but that just costs more money. I don’t want to upgrade from shared hosting until I 100% have to.

Comments are closed.

error

Enjoy this blog? Please spread the word :)

//
Our customer support team is here to answer your questions. Ask us anything!
👋 Hi, how can I help?