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

Jerrale G jerralegayle at sheltoncomputers.com
Thu Oct 7 18:09:18 EEST 2010


  On 10/7/2010 10:16 AM, Joseba Torre wrote:
> 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!

To help out this thread, my redhat (centos 5.5) says:
[root at mail ~]# ulimit
unlimited
[root at mail ~]#

This has never been changed by me and, so, I don't know why your redhat 
is coming default with a limit. You seem to not have changed it as you 
are baffled at why the limit is there. I'll try and figure out a 
permanent way for you to change it.

Jerrale G.
SC Senior Admin


More information about the dovecot mailing list