Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Mail is killing the processes on my server with IMAP

Why is mail over running my server with IMAP processes?

I've had to start killing the process like crazy cause it was causing other services on my website to fail.

i contact support for Hostgator and they asked if i was using Mac Mail. i said yes, and he said, yeah mac mail does that. what's that suppose to mean?

it really hasn't happened in the past, why now?

 Unibody MBP 15" 2.4Ghz 4GB RAM, Mac OS X (10.5.6), iPhone 3G

Posted on Mar 12, 2009 6:31 PM

Reply
48 replies

Mar 13, 2009 1:03 PM in response to BrianH

I'm just piping up with a "Me too!"

When I check the server process list, each email account that is set up in Mail takes up FOUR processes, and doesn't let them go until you quit. The users of my website complain, because whenever I check my mail, my site goes down with 500 errors because there aren't enough free processes available for PHP or MySQL to use.

I've tried disabling the IDLE checkbox, but it doesn't do anything. Is there a secret setting somewhere to limit the number of IMAP connections Mail makes?

Thunderbird does not do this (I think there's actually a setting for the number of processes to keep open) and while I'd hate to have to move away from Mail.app (I like the Address Book integration and my well-trained spam filter) if it means keeping my site up and running, I may have to.

Mar 30, 2009 11:49 AM in response to BrianH

I am having the same issue too with one of my clients. They use BlueHOST. I wrote up the problem & sent it to MacFixIt, but they haven't posted it yet. I also wrote a blog post about it on website "A process to a kill." This issue only started happening with one of the last OS X 10.5 updates.

I have clients using Mail.app and when I open Mail.app & watch the IMAP processes each user can generate 4-8 processes. Multiply that by several users and website mayhem ensues! Though access to their main website is okay, it's their WordPress blog that gets the boot ... so to speak. If I try to go to their blog I get a "too many process" error page.

If you are an individual user you may never know this is happening. But in a multi-user situation, this just won't work.

Even Entourage only generates one IMAP process when connecting.

Apple .... THIS IS HUGE! You need to fix this issue & fast!

Apr 13, 2009 12:37 PM in response to Joe Streno

I have found a temporary fix, until Apple addresses the issue.

For those with access to the cPanel for their hosting account, you will need to create a Cron Job. At blueHOST.com I have access to this feature. I created a cron job via the cPanel to run every two minutes (because I have so many users running mail at the same time.) And the command is "killall imap" (without the quotes). This will do as advertised, kill all imap processes, old and new, every two minutes. You can set the amount of minutes to anything you want.

I can thank a senior tech at blueHOST for the idea. It may be strong-arming the situation, but it gives my client back their blog.

In my first post here, I said I sent this to MacFixIt. They never published or followed up on the eMail I sent. But I've also formally sent this as an issue via Apple Support. With any luck it will be fixed with the 10.5.7 update when it comes out.

If you have not made a formal report to Apple I strongly suggest you go to the Mac OS X Feedback page & file a detailed report of the issue you are having with IMAP processes & Mail.app. Reporting in the support forums may not be enough to get the full attention of Apple.

I will also post this on my blog.

May 13, 2009 10:00 AM in response to clown guy

Thanks, but the two issues are not the same. The article you referred me to has to do with the local Mac processor. My problem is with Mail.app's use of IMAP processes on a server when it connects to that server to check for mail. They are completely different. Though just for kicks I tried your suggestion ... did not fix the problem.

The issue is reproducible every time, and not with just my computer. It's also occurring with with all my clients who use Mail.app. I have also reproduced the problem with a brand new computer with a virgin system. So it is definitely how Mail.app is connecting to an IMPA server.

Jun 24, 2009 9:33 AM in response to BrianH

This is an intolerable situation. A single user accessing their mail via IMAP with the newest version of Mac Mail is bringing down an entire hosted account, with a dozen active client sites and many more test sites!

I have a cron job running on the server as well now, killing processes every two minutes, but that's not a long term solution. The host is very unhappy with us.

It is simply not acceptable. There used to be an issue only with hosts running the Courier IMAP server that are accessed with Mac Mail IMAP - but now, this seems to be affecting servers using Dovecote, which was unaffected by previous Mac Mail process bugs.

APPLE - YOU NEED TO FIX THIS NOW.

Jun 24, 2009 10:00 AM in response to BrianH

Just FYI, potential Catch-22 with the cron jobs.
After implementing this fix, a bunch of my client's sites went down anyway.
Checked with my host - turns out a cron job is counted as a process by default, so, if there are already too many of these rogue IMAP processes running on the server - the cron job designed to kill them will not run!

Not sure how to solve that problem, so I asked my host to do it for me. They set the job to run no matter how many processes are already running.

Jul 13, 2009 12:16 PM in response to galiel

I just ran into this problem myself today! OMGosh!

Apple- please fix this immediately! I can't access my blog because of this unless I go into my control panel and kill the processes or have my hosting company kill the processes. The tech guy said he ran into another customer yesterday with the same exact issue - using Apple Mail.

Jul 13, 2009 12:59 PM in response to tjennings

I just got off the phone with AppleCare - a product specialist, Chris, for Mail - and explained this situation, telling him that this had actually taken down my PHP (server-side)-based website because it had used up all my allocated processes (I too am with Hostgator on a shared server). I was very patient. I didn't even raise my voice or call names or cast aspersions. It was probably one of the most unhappy, unsatisfactory tech support calls I've had with Apple since I started using their product in 1983. Generally, I think the sun rises and sets on AppleCare. They are pretty awesome.

Let's just say that I don't think a fix is forthcoming from Apple in the near future, and this ticket will continue to be unresolved. I will ask my hosting company to be sure to tell people to send Apple feedback AND to post their complaints to the forum in the hopes that when enough people have complained, Apple will pay attention.

Message was edited by: Theresa Mesa

Jul 13, 2009 2:53 PM in response to Dogcow-Moof

Here's the responses from Hostgator I received:

"We see many Apple Mail users with this same issue, and most shared hosts out there limit accounts to 25 processes and some even less, so it's not a Hostgator exclusive issue. I know we have contacted cPanel/Apple in the past but I haven't seen any changes evoked on either end yet."
----------------

"Unfortunately, this is a known issue with Apple Mail and several other IMAP clients.

These clients will create 4 processes for each e-mail account you are checking and keep them open until the mail client is closed even when not checking for new e-mail.

So, if you are checking 4 e-mail accounts on that domain, 16 processes are being used. If a partner is also checking 4 e-mail accounts (even the same e-mail accounts) you are suddenly using 32 processes, etc...

The only work around I have found so far is to create a cron job that runs every 15 minutes in cPanel and executes the following command:

killall -9 imapd

This will kill all imap processes every 15 minutes getting rid of some of them. They will be recreated the next time you check for new email, however.

In addition to this cronjob, you might change your mail client to check for email every 30 minutes.

Also, if you have a lot of e-mail accounts, you may consider consolidating them by using forwarders or checking some e-mail accounts only through webmail or POP3 instead of IMAP and keeping the most important e-mail accounts on IMAP.
---------------

If I have 3 IMAP email accounts on my server, and checking for email through Mail uses 4 processes, and I am only limited to 25 processes for my entire account, then I can't keep Mail open, because every hour, when it checks for mail again, it will add 12 more processes. If you do the math, I think you can see I'd use up the 25 processes pretty quickly, especially if the site itself is using processes because it's PHP-based. I've migrated one email account over to POP3, so now with two accounts I'm at 8 processes just for email for one get of email. Since most shared servers limit you to 25 processes, yes, it is a configuration issue, but it's a standard configuration.

Mail is killing the processes on my server with IMAP

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