[Dovecot] imap-login process_limit reached
I've been having some problems with IMAP user connections to the Dovecot (v2.0.8) server. The following message is being logged.
Jan 16 10:51:36 postal dovecot: master: Warning:
service(imap-login): process_limit reached, client connections are
being dropped
The server is running Red Hat Enterprise Linux release 4 (update 6). Dovecot is v2.0.8.
We have only 29 user accounts in /etc/dovecot/users. There were 196 "dovecot/imap" processes and 6 other dovecot processes, for a total of 202 "dovecot" processes, listed in the 'ps aux' output when problems were being experienced.
Stopping and restarting the Dovecot system fixes the problem -- for a while.
The 'doveconf -n' output is attached. I have not set any "process_limit" values, and I don't think I'm getting anywhere close to the 1024 default, so I'm pretty confused as to what might be wrong.
Any suggestions on what to do next are appreciated.
Thanks,
- Don
# 2.0.8: /etc/dovecot/dovecot.conf # OS: Linux 2.6.9-67.0.1.ELsmp i686 Red Hat Enterprise Linux WS release 4 (Nahant Update 6) ext3 auth_username_format = %Lu auth_verbose = yes auth_verbose_passwords = sha1 login_log_format_elements = user=<%u> service=%Us method=%m rip=%r lip=%l mpid=%e %c login_trusted_networks = xx.xx.xx.0/24 mail_location = maildir:/Virtual_Users/%u/Mail passdb { args = scheme=CRYPT username_format=%u /etc/dovecot/users driver = passwd-file } passdb { driver = pam } ssl_ca = </etc/dovecot/ssl/iMove_2011_CAcert.pem ssl_cert = </etc/dovecot/ssl/postal_cert.pem ssl_key = </etc/dovecot/ssl/postal_key+req.pem ssl_key_password = ********** ssl_parameters_regenerate = 12 userdb { args = username_format=%u /etc/dovecot/users driver = passwd-file } userdb { driver = passwd } verbose_proctitle = yes protocol imap { ssl_cert = </etc/dovecot/ssl/imap_cert.pem ssl_key = </etc/dovecot/ssl/imap_key+req.pem ssl_key_password = </etc/dovecot/ssl/imap.pw } protocol pop3 { ssl_cert = </etc/dovecot/ssl/pop3_cert.pem ssl_key = </etc/dovecot/ssl/pop3_key+req.pem ssl_key_password = </etc/dovecot/ssl/pop3.pw }
First of all, feature request:
doveconf -d show the default value of all settings
On 01/16/12 17:41, Don Buchholz wrote:
What makes you think 1024 is the default? We had to increase it. It shows up in doveconf -n output, so I don't think that's the default.
# doveconf -n | grep limit default_process_limit = 1024
On Tuesday, January 17, 2012 at 14:23:47 UTC, michael@orlitzky.com confabulated:
First of all, feature request:
doveconf -d show the default value of all settings
You mean like doveconf(1) ?
OPTIONS -a Show all settings with their currently configured values.
-- If at first you don't succeed... ...so much for skydiving.
On 01/17/12 09:31, Duane Hill wrote:
Using -a shows you all settings, as they're running in your installation. That's the defaults, except where they're overwritten by your config.
I was asking for the defaults regardless of what's in my config file, so that I don't have to deduce them from the combined doveconf output & my config file.
On 01/17/12 09:58, Michael Orlitzky wrote:
In other words, I don't want to have to do this:
mail2 ~ # touch empty-config.conf mail2 ~ # doveconf -a -c empty-config.conf | grep limit | head doveconf: Error: ssl enabled, but ssl_cert not set doveconf: Error: ssl enabled, but ssl_cert not set doveconf: Fatal: Error in configuration file empty-config.conf: ssl enabled, but ssl_cert not set default_client_limit = 1000 default_process_limit = 100 default_vsz_limit = 256 M recipient_delimiter = + client_limit = 0 process_limit = 1 vsz_limit = 18446744073709551615 B client_limit = 1 process_limit = 0 vsz_limit = 18446744073709551615 B
to find out that the default process limit isn't 1000.
On 2012-01-17 9:58 AM, Michael Orlitzky <michael@orlitzky.com> wrote:
Yeah, I had suggested this to Timo a long time ago when I suggested doveconf -n (the way postfix does it), but I don't think he ever did the -d option... maybe it got lost in the huffle...
--
Best regards,
Charles
Michael Orlitzky wrote:
What makes me think 1024 is the default? The documentation: --> http://wiki2.dovecot.org/Services?highlight=%28process_limit%29#imap.2C_pop3...
On 01/17/12 13:15, Don Buchholz wrote:
That's only for those three services (imap, pop3, managesieve), not for imap-login unfortunately. Check here for more info,
http://wiki2.dovecot.org/LoginProcess
but the good part is,
Since one login process can handle only one connection, the service's process_limit setting limits the number of users that can be logging in at the same time (defaults to default_process_limit=100).
Michael Orlitzky wrote:
Doh! Thanks, Michael. I wasn't looking at the original error message closely enough. I scanned too quickly and saw "service(imap)" and not "service(imap-login)". Now the failure when there are only ~200 (total) dovecot processes makes sense (because about half of the processes here are dovecot/imap-login).
I've added the following to our configuration:
service imap-login {
process_limit = 500
process_min_avail = 2
}
Thanks for your help ... and patience.
- Don
Don Buchholz wrote:
But, Michael's right, documentation can be wrong. So, I dumped the entire configuration. Here are the values found on the running system. Both imap and pop3 services have "process_limit = 1024".
| [root@postal ~]# doveconf -a
| # 2.0.8: /etc/dovecot/dovecot.conf
| # OS: Linux 2.6.9-67.0.1.ELsmp i686 Red Hat Enterprise Linux WS
release 4 (Nahant Update 6) ext3 | ... | default_process_limit = 100 | ... | service anvil { | ... | process_limit = 1 | ... | } | service auth-worker { | ... | process_limit = 0 | ... | } | service auth { | ... | process_limit = 1 | ... | } | service config { | ... | process_limit = 0 | ... | } | service dict { | ... | process_limit = 0 | ... | } | service director { | ... | process_limit = 1 | ... | } | service dns_client { | ... | process_limit = 0 | ... | } | service doveadm { | ... | process_limit = 0 | ... | } | service imap-login { | ... | process_limit = 0 | ... | } | service imap { | ... | process_limit = 1024 | ... | } | service lmtp { | ... | process_limit = 0 | ... | } | service log { | ... | process_limit = 1 | ... | } | service pop3-login { | ... | process_limit = 0 | ... | } | service pop3 { | ... | process_limit = 1024 | ... | } | service ssl-params { | ... | process_limit = 0 | ... | }
On 01/17/12 14:02, Don Buchholz wrote:
You probably just posted this while my last message was in-flight, but just in case, 'imap' and 'imap-login' are different, and have different process limits.
As the title of the thread suggests, you're out of imap-login processes, not imap ones.
On 17.1.2012, at 16.23, Michael Orlitzky wrote:
On Mon, 2012-01-16 at 14:41 -0800, Don Buchholz wrote:
Maybe this will help some in future: http://hg.dovecot.org/dovecot-2.1/rev/a4e61c99c7eb
The new error message is:
service(imap-login): process_limit (100) reached, client connections are being dropped
participants (5)
-
Charles Marcus
-
Don Buchholz
-
Duane Hill
-
Michael Orlitzky
-
Timo Sirainen