[Dovecot] leaking file descriptors? imap-login: inotify_init() failed
Even though the system is configured to allow a large number of open files, and tools such as lsof tell me dovecot is within that limit; I am seeing errors like this pretty frequently.
dovecot: imap-login: inotify_init() failed: Too many open files
I'm running Fedora Core 5 (2.6.18-1.2257.fc5 SMP x86_64) with dovecot-1.0-1.rc15 built from the FC6 SRPM, but I was seeing the same thing with 1.0-0.beta8.3.fc5 (one of the reasons for the jump to the FC6 ver).
# system default limit is very high, and we aren't approaching it [root@mail 2496]# cat /proc/sys/fs/file-max 738223 [root@mail fs]# cat file-nr 8704 0 738223
# the limit per user is 1024 [root@mail 2496]# su -c 'ulimit -n' dlbewley 1024
# But dovecot doesn't appear to be above that.
# it looks like the master process is well below that
[root@mail 2496]# lsof -p cat /var/run/dovecot/master.pid
| wc -l
280
# but overall, this user has way more than that
[root@mail fs]# lsof -nu dovecot |wc -l
3145
So, I raised the limit for dovecot to 5000 soft and 10000 hard to see if it would make a difference. Even after a reboot, the next day the errors returned.
Today login_process_per_connection is set to 'no' rather than the default to see if it makes a difference. So far today, no errors.
Config looks like this: protocols = imap imaps pop3 pop3s ssl_cert_file = /usr/share/ssl/certs/mail.cert ssl_key_file = /usr/share/ssl/private/mail.key disable_plaintext_auth = no login_process_per_connection = no max_mail_processes = 2048 protocol imap { } protocol pop3 { } auth_username_chars = auth_master_user_separator = * auth default { mechanisms = plain passdb passwd-file { args = /etc/dovecot/dovecot.masterusers master = yes pass = no } passdb pam { } userdb passwd { } user = root } plugin { }
Dale Bewley - Unix Administrator - Shields Library - UC Davis GPG: 0xB098A0F3 0D5A 9AEB 43F4 F84C 7EFD 1753 064D 2583 B098 A0F3
On Thu, 2007-02-01 at 11:24 -0800, Dale Bewley wrote:
dovecot: imap-login: inotify_init() failed: Too many open files
I guess it's this:
EMFILE The user limit on the total number of inotify instances
has been reached.
There's no reason for imap-login processes to use inotify at all though. This should fix it: http://dovecot.org/list/dovecot-cvs/2007-February/007685.html
participants (2)
-
Dale Bewley
-
Timo Sirainen