4
Max Connections and Port Exhaustion
Problem reported by Scarab - 2/18/2020 at 4:20 PM
Submitted
SM Enterprise v100.0.7242.24590. When the number of IMAP connections exceeds the Max Connections set for the IMAP protocol SM gives a "421 Server is busy, try again later" & "Too many concurrent sessions (6000/6000)." This part is working as intended.

Granted, this is normally an extremely rare occurrence, but thanks to the most recent Apple update I woke up on President's Day to find a whole bunch of Apple users with 100+ IMAP connections each yesterday morning and couldn't easily remedy it. Although you could use the MANAGE > CONNECTIONS > DROP CONNECTIONS to drop IMAP connections unfortunately the count at the top was showing @6000 more connections than were actually listed (and quickly rising). Apparently it was counting the rejected connections in the Total but not listing or dropping those connections. As those rejected IMAP connections were counting towards the Total and exceeding the Max Connections, the IMAP ports were exhausted and no new IMAP connections could be made...and considering thousands of rejected connections per minute it was never going to resolve itself and it was only going to get worse.

A restart of the SmarterMail service was the only resolution at that point, followed by changing the Max Connections for the IMAP protocol (turns out ENABLE THE IDLE COMMAND in the SETTINGS > PROTOCOLS ultimately fixed the new Apple Mail/MacOS Mail issue with the ridiculous number of IMAP connections. We had disabled it a year or so ago because of another issue with Apple not handling IMAP IDLE properly.). 

Note: Our IMAP timeout is set to 30 minutes.

tldr; rejected connections should not be counted towards the number of concurrent sessions for the Max Connections, yet apparently it is.

2 Replies

Reply to Thread
0
Matt Chatterley Replied
Thanks for posting this - we are having a similar problem with port exhaustion; I had been blaming inbound spam traffic on SMTP, however, I'll look at IMAP settings too.
1
Kyle Kerst Replied
Employee Post
Hello Scarab/Matt, thanks for reporting this scenario! I've created a ticket from this posting so that we can pass these findings along to development along with some ideas on how we might better mitigate these issues in the future. I'll report back here when I hear more. Have a good one!
Kyle Kerst System/Network Administrator SmarterTools Inc. (877) 357-6278 www.smartertools.com

Reply to Thread