IMAP Multiple Connections / Processes Website Problem: Site Down
TutorialRef.com >> Home
Date modified - June 12, 2009
Setting up your email accounts to use IMAP has some benefits but you may eventually come across a problem with multiple IMAP connections opened simultaneously or even when not open simultaneously. I'm not certain of the cause of this problem. I assume the root is somewhere due to a mail server problem. I currently host with Bluehost. Let me first describe the problem as it may be a reflection of the problem you may be encountering. With one client I had to set up email accounts for several (around 20) persons and it seemed to be growing. I set up every account as IMAP as this will allow the recipients to view and send email from any computer and yet have all their emails synched. This is a good feature.
However, this seemed to bring down the entire account (meaning all the websites associated with this account) went offline. Actually, one of the side effects was a completely blank screen. No page errors displayed; no 404 error pages or any other errors. Just a blank screen was displayed for the websites associated with the account. After I inquired as to the cause of the problem with the Bluehost techs they found that there were multiple processes or connections to the server.
The Process Manager is found once you login to your control panel. This applies to the CPanel control panel and I believe there is a similar adminstrative panel for Plesk. In CPanel this is located in the farthest left, bottom region of the page. You may see multiple processes running. If this is the case then all you need to do is kill the processes. I'm not certain why this was occurring and I asked the Bluehost technician regarding this problem. Their response was simply to login to the CPanel and kill the processes. This didn't seem like a good answer as I never knew when the websites would encounter this particular problem.
So I emailed the Second Level Support Engineer. This is his response:
"It is not a good idea to run a cron to kill imap processes since it could potentially cause problems. A better idea would be to run a cron job that will create a log file of what is open and what application and user has it open. Then, you can adjust your applications to not open so many connnections or ask those causing the problem to turn off their applications when finished. You can setup the following cron job to create a log file of all open imap connections. Please login to cPanel, click on Cron Jobs, Click the STANDARD button and in the command to run box type the following:
lsof | grep imap >> imap_connections.log
Choose how often you would like it to run and save the cron job. You can then view the imap_connections.log file in the home directory and if you need help understanding the log file, please let us know and we can explain what it contains."
Just a side note, I think Bluehost's Support Engineers are very good and helpful. Eventhough this did not completely resolve the IMAP multiple connection problem it allowed some reprieve. However, as mentioned previously, this occurs infrequently (once every few months) so I have not yet implemented the solution suggested by the Support Engineers.