I have a client whose website kept generating 500 Server errors. Thanks to Hostgator support, I finally figured out that the error was caused by Apple Mail.
That’s right. Apple Mail. The client was on shared hosting on Hostgator and he was using Apple Mail on his Mac and his iPhone to access IMAP mail on the shared hosting mail server. Furthermore, he had several employees doing the same thing.
Normally, using IMAP mail protocal would not cause a problem, but it turns out that Apple Mail starts a new server process every time it checks for new mail, but it does not close the process after it has checked for mail.
As a result, if you have several devices using Apple Mail to access IMAP email accounts on shared hosting, you can eventually generate more processes on the server than you are allowed to have. When this happens, you get a 500 error when you try to access your website. Eventually, the error will go away, but it will come back whenever you reach the process limit on your server.
This is a major problem because the 500 error prevents your website from displaying.
The following is a list of things you can do to resolve the problem:
Switch the mail protocol to POP.
- Update 05-30-2013: I talked with Hostgator about this issue and they said you can continue to use IMAP protocal, but change Apple Mail client settings as described below.
- Close Apple Mail in all except one device: this means for each user. For example, if one user has an iphone, ipad, and mac with mail open for a single mail account, then all three of those devices creates a new process each time it checks for mail.
- Change the frequency with which your Apple mail client checks for mail: try 30 minutes or an hour.
- Turn off Fetch New Data for Apple Mail on iPhone or iPad and set mail Fetch to Manual.
- Finally, if none of that works, try using Gmail. I use Gmail IMAP on my iPhone, iPad, and Mac, and I have not had any issues.
Thanks for the article, dude!
I really appreciate that,….just find it quite amazing that this is still not solved…..
Pat Fortino says
Glad to help. Note, I talked with hostgator about this issue, and they said you can still use imap, but they said to set all email clients to download mail manually or at long intervals; eg, check for mail every hour rather than every five minutes. Or, if you use ios devices, set the fetch to manual; when you do that, the ios mail only checks for mail when you load the app.