Recently I started having some problems with Akonadi/KMail (I have version 23.04.3). I often (about each hour) get this error dialog in KMail saying that authentication did not succeed and the server error message that is appended is the following:
Login failed, server replied: A000002 NO Too many open connections ( 50 of 50 for jlp@holodeck1.com )
The Kolab Now tech support says that there is an Akonadi setting along the lines of “Max number of cached server connections” that I should check and lower if needed. But I can not find this setting anywhere.
Anyone knows anything about this setting or problem?
I’m not aware of any such configuration in Akonadi. The IMAP resource has hardcoded limit of 2 connections (one for downloading/uploading emails, one for push notifications). What you could try to check is whether the IMAP resource might be losing connection (due to unstable connectivity, firewall cutting the connection or what not), that could cause the connection to not be terminated properly, so the server might not detect the disconnect properly, so you quickly reach the limit of connections?
I know that e.g. GMail has a similar (even stricter) limit on the number of parallel IMAP connections to the same account and I I’m not aware of any reports from users about reaching the limit.
pprkut mentioned the same issue during Akademy and had come to the same conclusion: The IMAP resource disconnects due to a timeout, but the server still considers the connection active.
@Paul_Brown Nope, unfortunately, I have found no solution. As far as I understand it is something wrong either with the Kolab server or its configuration. But I do not know enough about all this to provide useful information. Maybe it would be best for knowledgeable people from Akonadi/KMail to directly step in contact with Kolab and could more directly and easily see what is going on.
In the meantime I now mostly use Kolab through their web interface, since another problem I noticed with KMail was that sometimes after this max server connection problem happens Akonadi/KMail stops checking/retrieving new email and I have to restart Akonadi to get it working again.
Hi,
I’ve looked into how our (kolabnow) imap servers behave in this regard. In my testing the connection limit works reliably (I can open 50 connections, close a connection, open a new connection, etc.), so I’m curious what could be going on here.
I suppose if connections are just dropped the server would never notice and keep them open for ~32minutes. So if that happens 25 times within the 32minutes with two connections I suppose we could get there. This doesn’t seem to be a problem if connections are closed normally, but maybe with interrupted network connectivity?
To check if akonadi is keeping more than two connections for some reason something like this should work: sudo netstat --all --program | grep imap
If you do not see ~50 connections at the time when you get the “Too many open connections” problem, then it seems like the dropped connections could be the culprit.
I’ll investigate if there is a good solution to that (tcpkeepalive I suppose).
Do you experience this with a wifi connection or also while wired (I’m wondering if this is related to connections being dropped and reestablished)
Definitely not related to this. I have a tower computer connected by cable directly to the router, which is directly connected to the outside world with fiber. Also it would not explain why your other client and KMail user, @JLP , is also having the same problem, but no-one else I have been able to locate.
And I will tell you another thing: it has been going on for years and I thought it was a KMail/Akonadi quirk, and only recently have I come to realise it is probably more a KMail/Akonadi + Kolab Now thing. I have been unable to find anyone else with other providers that suffer the same problem.
Once akonadi hits the connection limit, what do you get
for the “sudo netstat --all --program | grep imap” command ?
Thanks for the info. Clearly not 50 connections lingering… It’s a weird issue for sure. I’m not aware of any similar issues of non Kontact users, so there must be some weird interaction going on.
Yes. There was a time I thought it was only me, because, however hard I looked, I would always come up empty. But the other case seems to indicate that there is something going on between both ends.
I have switched to using KMail/Kontact for Kolab accounts and have been using this for the last 2 or 3 days and indeed it appears I do not get the errors anymore. Thanks from my side too.