[dovecot] Re: Failure in the presence of too many connections

Mark E. Mallett mem at mv.mv.com
Mon Mar 31 19:51:00 EEST 2003


On Mon, Mar 31, 2003 at 11:59:21AM +0300, Timo Sirainen wrote:
> On Sat, 2003-03-29 at 16:39, Mark E. Mallett wrote:
> > > > dovecot-auth: getpwnam(xxxx) failed: Too many open files
> > > 
> > > What passdb are you using? PAM? Something is leaking fds there, but I
> > > don't think it's getpwnam() itself.
> > 
> > Plain old passwd file checking.
> > 
> > auth = default
> > auth_mechanisms = plain
> > auth_userdb = passwd
> > auth_passdb = passwd
> 
> Well, that's strange. I don't think getpwnam() should leave any fds
> open. Auth process does keep one fd per login process, but that's also
> closed when client logs in or closes the connection. Maybe using
> passwd-file instead would help?

My suspicion (without any basis, admittedly) was that the fds were
related to the interprocess communication, not the passwd file access.
I was surprised when it happened, as the system ran fine for weeks
before I saw this error, and then I saw it recur quickly when I stopped
and restarted the dovecot processes before running it again with a
higher openfiles limit.  I think the fd exhaustion is related to a
sudden burst of connections to the POP or IMAP services, not a
long-term leakage of FDs (although I did say something like that in my
initial mail).

The point was not so much that this happens-- but that it doesn't
recover when it does happen (thus the subject line).  The only way to
make the services start responding again is to stop and restart the
dovecot suite of control processes.  Raising the openfiles limit
certainly pushes off the problem, and maybe that's a good enough
workaround (as long as there's always a higher limit availble...)

mm



More information about the dovecot mailing list