Mail.app keeping IMAP connections alive and active

Hi all,

I was having some issues with the MySQL databases on my website, so I gave my hosting provider a call.

It seems that Mail.app is opening up an IMAP process for each of my 24 e-mail accounds, and keeping it alive for as long as Mail is running. According to the representative I spoke with, e-mail clients, even with IMAP should start a process, synchronize the mail, and close the process, and all of this should happen in around 0.2 seconds.

The problem is that there is a cap of 20 processes on my hosting server, so Mail's behavior is basically causing lots of problems - as long as mail is open and all of my accounts are enabled, my website can't access my MySQL databases.

Does anyone know of a solution to this problem? I used to have "Automatically synchronize mailboxes checked" and tried unchecking this for troubleshooting purposes, but the same thing still happens.

Any ideas or suggestions will be very appreciated.
Thanks!

MBP 17" - 2.16Ghz - 2Ghz RAM - 100GB 7200RPM HD, Mac OS X (10.4.10), Mighty Mouse, Airport Extreme, Airport Express, iPod Nano 2GB, iPhone 8GB

Posted on Sep 22, 2007 7:23 AM

Reply
6 replies

Sep 22, 2007 7:43 AM in response to Alok

If there is a cap to 20 processes then presumably you can't check all your email accounts at the same time?

This process cap sounds like a red herring to me. If this was the case then when you check you email the server would stop serving your site and database.

If it really is the case have you considered reducing down the number of email accounts you use - is 24 really necessary?

Sep 22, 2007 8:34 AM in response to Matt_Robinson

That's true. The process limit doesn't effect the actual web hosting, so the front-end of my site appears fine. It's only PHP Database applications that are effected, and any other "applications or scripts," which are apparently deemed as "processes."

The thing is, Mail is keeping the connection active, so if one was to look at my process manager, it would appear that Mail is constantly checking every e-mail account, not just checking and caching.

Unfortunately, for business reasons, I can't really reduce the number of e-mail accounts. Right now I have 15 of them "disabled," and I've been swapping which accounts are "enabled" every few hours, but this definately isn't something I can do long-term.

Nov 23, 2007 2:24 AM in response to Alok

From what I've read, imap is designed to create a persistent connection, and keep it open until you quit the program.

But there's another problem which might be getting in your way: mail.app does indeed create persistent connections, but then rather than re-using them, it seems to open another new persistent connection each time it checks the mail. So the processes never close, and they start to pile up as new ones are added.

What's more, mail opens multiple connections per account. Looks like it opens 4 connections to check each separate account, and those all get left open until you quit the program.

The reason they do this is, so they say, "performance". More connections = faster mail. But it's a real headache when it doesn't close old processes before opening new ones.

Also an option to limit the number of connections made per account would be welcome.

Thunderbird does exactly the same thing, by the way.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Mail.app keeping IMAP connections alive and active

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.