Tuesday, June 19, 2012

Apple iMail crashes VPS websites

I ran across an interesting problem today. A website went down, and it was presenting me with this error message:


500 Internal Server Error


The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@website.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache Server at www.website.com Port 80



Now this particular website is hosted on a Hostgator VPS server. I looked at the cPanel for the server and everything appeared good. The file structure and security was intact, and the databases were healthy. I checked the event logs in my cPanel and found this:

[Tue Jun 19 19:09:46 2012] [error] File does not exist: /home/username/public_html/500.shtml
[Tue Jun 19 19:09:46 2012] [error] SoftException in Application.cpp:574: Could not execute script "/home/username/public_html/index.php"

So I checked into that error and it appeared that I needed to contact the Hosting provider.

I got on chat with Hostgator and they informed me that the problem was my "process" usage was too high. Shared VPS systems limit the number of concurrent processes that a given account is permitted to run. The limit is 25 for this particular hostgator account.

They also said that e-mail processes were to blame.

I requested for them to kill the processes, and then the website came back online.

A few moments later it went back down.

This site only had 3 users with e-mail so I asked them to shut down their Apple iMail applications on their macbooks. They also had iphones and ipads syncing. All of this had been set up and working fine for months without changes.

While they all have Macbooks, only one of them was causing the issue. A single iMail application on one of the 3 Macbooks, when shut down, would instantly release the process overload on the Hostgator VPS server and the website would immediatly appear! The second you started iMail back up however, the website went down. iMail was strangling the processes on the Hostgator VPS via IMAP queries over the internet. Since the Hostgator VPS had both the e-mail, and the website, when the processes spiked to over 25, Hostgator's policies instantly cuts the VPS off from running additional processes.

This is a very strange problem. My recomendation is to use Hosted Exchange from Node. Check it out here.