You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

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

Limit Number of IMAP connections to Mail Server ...?

Greetings,

My host is complaining that Mail's IMAP opens too many connections (and keeps them open too long)... which is causing some issues on the hosting end.

Is there any way to limit the amount of connections Mail makes?

IMAP-IDLE is already turned off on all the accounts.

mini, Mac OS X (10.6.4)

Posted on Aug 17, 2010 9:59 PM

Reply
63 replies

May 7, 2013 3:43 PM in response to badtz

LOL - you are clearly clueless forum troll. Let's see - it makes WAY more sense to have islands of discussions on similar topics rather than to collect relevant and related information in a smaller set of threads- ya shure you betcha. You're the kind of person who thinks it's best to open multiple trouble tickets for the exact same issue. The only wate of space is this little meaningless discussion we're having right now...and it's now over. Get a life brah...

Feb 11, 2015 4:24 PM in response to badtz

I know this is an old thread, but for those that follow....


For an answer to this, try (long version):

http://premium.wpmudev.org/blog/warning-your-iphone-or-mac-mail-may-be-killing-y our-website/

or (short version):

http://support.hostgator.com/articles/specialized-help/email/setting-up-email-fo r-the-apple-iphone


Too Many Connections - 500 Errors?

On the iPhone there is a function called "push," and when it is enabled it keeps the connection to our server open and continually checks mail. Consequently, this creates many IMAP processes and eventually conflicts with our Terms of Service.

To avoid running excessive IMAP processes, you can disable push when you don't need it.

  1. Go to Settings > Mail, Contacts, Calendars > Fetch New Data.
  2. Toggle Push to Off.

Now, instead of retrieving emails continuously as they arrive, your iPhone will use the global Fetch setting to retrieve emails manually or at intervals.


This solved my equivalent issue with Hostgator and my wife's iPhone...

Sep 24, 2010 12:45 PM in response to badtz

Bump - I am facing exactly the same issue. I have set up 6 accounts with my hosting provider for my whole family, and because of Mail.app behavior it creates 20+ connections and causes my hosting site to refuse new connections and takes out my personal website.

Is there a way to make the connections not persistent? Or to limit the maximum number of connections to a single server?

Sep 24, 2010 5:00 PM in response to badtz

I am also having this issue. IMAP IDLE is checked in advanced settings, but it is greyed out. I need to be able to limit the number of connections, or some way to make it close the connection when it's done getting new messages. I have dialed back the check-mail interval to 30 mins from 5 mins, but that hasn't helped any.

Oct 19, 2010 4:55 PM in response to badtz

I'm going to bump this as well. This started for me back in August; the net effect then was that one of my two desktops running Mail could not connect (I have one machine that does things like act as a SpamSieve drone) and my wife couldn't get her mail, either.

I thought the problem was a change at the web host, but they said "no." Not believing them, I switched my site and my wife's to a different host and the problem continued. Actually, it got worse, because my personal website (running Drupal) would go down. The new host identified the problem as being too many connections (processes) open to the server.

I stopped using IMAP-IDLE with no change in behavior.

(There's a key in com.apple.mail.plist that controls this setting:

<key>UseIDLEIfAvailable</key>
<string>NO</string>

If that key is missing the Use IDLE If Available checkbox will be disabled. I don't think adding it will make a difference, but you could try.)

I also disabled notes and todos for each account (so the Apple Mail To Dos mailbox doesn't get created) and changed each account on my SpamSieve drone so that the Junk mailboxes were created on the Mac. That meant two fewer open mailboxes for each of four different accounts... but I still have too many connections open on my hosting account. (I also disabled the accounts on my iPod and iPad.)

Would appreciate any more suggestions before I switch to a completely different email client. (Taking suggestions for that, too.)

Nov 21, 2010 11:13 AM in response to badtz

BUMP

Agreed, Absolutely ridiculous that this has not been addressed. I guess it meets Apple's sales model. Mett the average consumers needs and wants, but ignore any advanced need. I am under the assumption that, even though IDLE is SUPPOSED to do something, it doesn't make a difference in the number of connections, at all. This has been tested on two totally different host, and one controlled and maintained by a family number. The amount of connections Mail makes per account is out of this world and causes server wide problems.

I actually changed hosts and moved websites to address this problem and not have to resort to Thunderbird. I say resort, not because it is bad software, but because I want to all of my Apple software and hardware to play nice together, as all of us do, and is the reason most of us spend 2x$ for Apple gear. I had to move all of my accounts to Thunderbird again because my new host (HostGator) will shut my sites down while the two computers in my office access 4-5 accounts each.

I have visited and re-visted the Apple forums over the last couple years, waiting for a solution. I can't believe this. I guess I'll join the petition now. I feel bad for the people out there experiencing these issues, having no clue what is causing it, how to research it, or what to do about it.

Apple, please just fix it.

Dec 3, 2010 2:15 AM in response to JoeWMpls

I've been having this very same problem since I started accessing my IMPA accounts from my iPhone and iPad on top of my Mac, and it seems I'm going to have to try and find a new host, since they don't offer any solution.
You said you switched host, does the new one solve the issue? If so, what company is it?
Thanks.

Dec 3, 2010 4:48 AM in response to JoeWMpls

What are the number of connections being cited? I have eight IMAP accounts (and 7 POP) accounts, four of which are with my hosted accounts with DreamHost, plus one with MobileMe, Gmail and AOL. I have not gotten any feedback as to any problems. Apple as the provider of MobileMe IMAP accounts should see the same thing any other provider sees, one would think?

I do know that Mail 4.x checks the connection with the SMTP on a regular basis, even if the SMTP is not currently used by any account, but this is not limited to IMAP, and is not controlled by the frequency of checking for new messages.

More info, please.

Ernie

Dec 3, 2010 4:53 AM in response to Ernie Stamper

I just know, from the mail server logs that my hosting company (lunarpages) provided that the connexion limit is exceeded... I'm using about 9 IMAP accounts (each on different domains linked to the same host account) on my MacBook Pro, my iPad and my iPhone. The problems occur when all these devices access the IMAP server from the same wifi network, i.e. using the same IP address...
Here are the limits that I was made aware of by my host:
100 Maximum IMAP Connections
15 Maximum IMAP Connections Per IP
15 Maximum TLS/SSL IMAP Connections Per IP
Number of Authentication Daemons 5
I have the problem whether I use SSL or not, so it's not related to that... it's probably the 15 IMAP connections by IP and/or the 5 authentication daemons.

Dec 3, 2010 9:43 AM in response to m::se

During what span of time? Without that info, these limits seem ridiculously low. The nature of IMAP is that the mailboxes/folders reside on the server and not on the computer. Thus simply using the email client requires connection. Unless another email client "holds" the connection, and use doesn't show up as a new or renewed connection, I don't see why Mail would be different?

Ernie

Dec 3, 2010 2:54 PM in response to m::se

Interesting discussion unrelated to Mail or to Macs at:

http://www.google.com/support/forum/p/gmail/thread?tid=56a00af6e404cc7f&hl=en

also, at:

http://serverfault.com/questions/176494/options-for-proxy-ing-a-connection-limit ed-imap-account

I also note that while use of the IDLE Command may mitigate this problem, the server must capable:

http://kb.mozillazine.org/IMAP:advanced_accountconfiguration

Also issues with Outlook discussed at:

http://thedailyreviewer.com/outlook/view/maximum-number-of-server-connections-on -imap-server-101577860

As far as HostGator, the problem seems to be as much with their specs, as with Mail?

http://forums.macrumors.com/showthread.php?t=965587

Btw, I connect with my IMAP accounts either with three computers, or two computers and my iPad. I guess my providers are not using Courier servers?

Ernie

Message was edited by: Ernie Stamper

Feb 8, 2011 4:38 PM in response to Michael Meiners1

Sad as it is, the only solutions I can find to this issue are:

1. Switch hosts. Ouch.
2. Switch email clients to one that lets you limit the number of open IMAP processes. Ouch.

Seems to me that the blame here rests on both Apple and the host (Hostgator and Bluehost are known to have this issue). Apple could put in a setting to let you limit the number of IMAP processes. Your host could support the IDLE command, which it seems these ones do not.

Instead, these hosts limit you to 25 simultaneous processes, which becomes limiting pretty quickly at 4 constant processes per IMAP account per device (the iPhone adds 4 more per account). One person with two accounts checked by both Mac Mail and iPhone can eat 16 or 25 processes by themselves. Next thing you know your site is down or someone can't get their email.

What you CAN do is submit feedback to Apple about wanting the option to limit processes in Mail, although they are no doubt aware of the issue and don't care. I've seen several references to people submitting this issue to Apple years ago and nothing's happened so far. My guess is they'd point to the host for not supporting the IDLE command and the host would point to Mac Mail for not letting you limit connections.

May 15, 2011 2:45 PM in response to badtz

This is a serious problem with Mac Mail... In my company we use iPhones and some Macs as IMAP clients and in my server there's a lot of unused IMAP connections opened all the time.


***?! This a is a 7 year problem!!! Just make it right... it's not hard to control open sockets for god sake!


Did someone got a solution? Other than thunderbird... because thunderbird can do it right... one connection per email address and thats it.


Thanks!

Limit Number of IMAP connections to Mail Server ...?

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