Upgrade 2.2.27 to 2.3.9.2: master(imap): net_connect_unix(imap) failed: Resource temporarily unavailable

Eirik Rye rye at domeneshop.no
Wed Jan 8 11:49:48 EET 2020


On 08/01/2020 01:47, @lbutlr wrote:
> On 07 Jan 2020, at 07:15, Dovecot Mailing List <dovecot at dovecot.org> wrote:
>>   dovecot: master: Warning: service(imap-login): process_limit (16) reached, client connections are being dropped
> 
> Is this an actual problem? Most client connections are idle, so I doubt if the occasional drop is noticed at all.

I assume it would mean Dovecot is dropping new incoming connections 
(e.g. new users trying to log in), not existing idle connections? 
Dropping new incoming connections is a major problem, because some email 
clients (e.g. Outlook) are notorious for giving the users password 
prompts whenever something unexpected happens.

It is a problem because it is unexpected behaviour. Where are the 
imap-login sockets going, if not to serve active TCP connections? On all 
servers, the number total-available imap-login processes is 
significantly larger than the number of TCP connections on the server. 
In some cases, it is about

~# ss -nt | wc -l
7817
~# ss -nt "( sport = :143 or sport = :993 )" | wc -l
7812
~# doveadm process status | grep "^imap-login "
imap-login 17384 1462            44553       0          1578475790 
   0
imap-login 17383 550             66830       0          1578475790 
   0
imap-login 17382 488             59074       0          1578475789 
   0
imap-login 17381 929             58251       0          1578475790 
   0
imap-login 17380 712             62790       0          1578475790 
   0
imap-login 17377 1608            35143       0          1578475790 
   0
imap-login 17376 1718            27955       0          1578475790 
   0
imap-login 17375 1880            14903       0          1578475789 
   0
imap-login 17374 1965            10754       0          1578475790 
   0
imap-login 17373 1796            21137       0          1578475790 
   0
imap-login 17372 1194            52360       0          1578475789 
   0
imap-login 17371 1994            7482        0          1578475790 
   0
imap-login 17370 2061            3793        0          1578475789 
   0
imap-login 17369 2127            2992        0          1578475789 
   0
imap-login 17368 2014            5152        0          1578475790 
   0
imap-login 17362 2144            2723        0          1578475787 
   0
~# doveadm process status | grep "^imap-login " | awk "{sum += \$3} END 
{print 40000-sum}"
15385

Why is there a (growing) discrepancy between the number of active TCP 
connections, and the number of reported free imap-login sockets? Is 
something else using imap-login thr

> Also, why a limit of 16? Have you tried, oh, 160 instead?

The limit was set to match the process_limit of the imap service 
(16*1250=20000).

We have made the assumption that imap-login should not require more 
sockets than the maximum number of concurrent imap sessions. We have not 
had any issues with this before upgrading, but it appears to not be the 
case in 2.3.x?


-- 
Eirik


More information about the dovecot mailing list