[Dovecot] And again... too many open files

Joseba Torre joseba.torre at ehu.es
Thu Oct 7 17:16:02 EEST 2010


On Miércoles 06 Octubre 2010 17:11:49 Timo Sirainen escribió:
> > Ops! I thought limits.conf was a semi-official answer for this issue.
> > But  you're right, I've been playing with it and looking at
> > /proc/$PID/limits and it has no influence. It works for initial dovecot
> > process (run by root),
> 
> Really? It does change it then. Maybe the "*" line? I'm pretty sure the
> "dovecot" lines don't..

Sorry, I was confused. When started at boot, it doesn't affect, but when I do 

# service dovecot restart

as root, the root lines apply.

> 
> > but not for the imap-login or pop3-login ones.
> 
> That's because these processes calculate the max. number of needed fds
> and drops the limit automatically.
> 
> Are you actually seeing error messages about actually running of fds?

I got a lot of 

dovecot: pipe() failed: Too many open files

until I restarted dovecot.

> I
> 
> thought the problem was:
> > "Warning: fd limit 1024 is lower than what Dovecot can use under full
> > load"
> 
> This is checked only at startup when running the master process. And if
> dovecot process's fd limit is higher than 1024, then I'd think this
> error message goes away?..

Finally, if changed my startup script adding

ulimit -n 4096

before

daemon /usr/local/sbin/dovecot

and the problem has disappeared.

Thanks!
-- 
Joseba Torre. Vicegerencia de TICs, área de Explotación


More information about the dovecot mailing list