We've run into a situation where the Dovecot master process "dovecot" runs out of file descriptors on Solaris 10 since the default is only 256:
# plimit 1 1: /sbin/init resource current maximum time(seconds) unlimited unlimited file(blocks) unlimited unlimited data(kbytes) unlimited unlimited stack(kbytes) 8192 unlimited coredump(blocks) unlimited unlimited nofiles(descriptors) 256 65536 vmemory(kbytes) unlimited unlimited
Output from "pfiles" after we raised the limit manually:
# pfiles 26378 | head -10 26378: /ifm/sbin/dovecot -c /etc/dovecot.conf Current rlimit: 16384 file descriptors 0: S_IFCHR mode:0666 dev:327,15 ino:18128 uid:0 gid:3 rdev:13,2 O_RDONLY|O_LARGEFILE /export/zones/dovecot/root/dev/null 1: S_IFCHR mode:0666 dev:327,15 ino:18128 uid:0 gid:3 rdev:13,2 O_RDONLY|O_LARGEFILE /export/zones/dovecot/root/dev/null 2: S_IFCHR mode:0666 dev:327,15 ino:18128 uid:0 gid:3 rdev:13,2 O_RDONLY|O_LARGEFILE # pfiles 26378 | tail -10 243: S_IFIFO mode:0000 dev:324,0 ino:2038192 uid:0 gid:0 size:0 O_RDWR|O_NONBLOCK FD_CLOEXEC 246: S_IFIFO mode:0000 dev:324,0 ino:2048002 uid:0 gid:0 size:0 O_RDWR|O_NONBLOCK FD_CLOEXEC 247: S_IFIFO mode:0000 dev:324,0 ino:2048441 uid:0 gid:0 size:0 O_RDWR|O_NONBLOCK FD_CLOEXEC 258: S_IFIFO mode:0000 dev:324,0 ino:2042076 uid:0 gid:0 size:0 O_RDWR|O_NONBLOCK FD_CLOEXEC 459: S_IFIFO mode:0000 dev:324,0 ino:1311426 uid:0 gid:0 size:0 O_RDWR|O_NONBLOCK FD_CLOEXEC
Perhaps the Dovecot master process should raise it's own limit to the allowed maximum when it starts? (getrlimit()+setrlimit()), or be user configurable?
Has this been discussed somewhere before?
- Peter