22 Jan
2015
22 Jan
'15
2:01 p.m.
Hi, with a low soft limit on file descriptors, dovecot 2.2.15 warns on startup:
Warning: fd limit (ulimit -n) is lower than required under max. load
(256 < 1000), because of default_client_limit
It could try increasing the limit first, and only report the warning if that fails. I'm attaching a patch that does just this.
Without the patch, the soft fd limit is kept at whatever it was on dovecot startup:
% pfexec plimit $(pgrep dovecot)
18737: /opt/niksula/sbin/dovecot
resource current maximum
time(seconds) unlimited unlimited
file(blocks) unlimited unlimited
data(kbytes) unlimited unlimited
stack(kbytes) 10240 unlimited
coredump(blocks) unlimited unlimited
nofiles(descriptors) 256 65536
vmemory(kbytes) unlimited unlimited
and with patch applied, it's increased to max_client_limit:
% pfexec plimit $(pgrep dovecot)
18775: /opt/niksula/sbin/dovecot
resource current maximum
time(seconds) unlimited unlimited
file(blocks) unlimited unlimited
data(kbytes) unlimited unlimited
stack(kbytes) 10240 unlimited
coredump(blocks) unlimited unlimited
nofiles(descriptors) 1000 65536
vmemory(kbytes) unlimited unlimited
It should probably be increased to higher than that to account for fds other than client sockets, but I don't have insights into that.
-- Lauri Tirkkonen Niksula systems specialist