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.
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
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.
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
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:
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
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!