On Tue, Mar 06, 2007 at 04:38:12PM +0200, Timo Sirainen wrote:
On Tue, 2007-03-06 at 08:49 -0500, Victor Duchovni wrote:
On Tue, Mar 06, 2007 at 03:20:26PM +0200, Timo Sirainen wrote:
On Mon, 2007-03-05 at 15:51 -0500, Victor Duchovni wrote:
I upgraded (NetBSD 2.99 i386) from 1.0rc7 to 1.0rc24 and then tried rc25, and in both cases need to restart Dovecot every day or so (low volume server). It seems to run out of file descriptors. I have now raised the file descriptor limit to 1024, but that is not a long-term solution...
I guess you built with kqueue code?
I used the pkgsrc defaults. It looks like this uses kqueue. I am puzzled why kqueue introduces descriptor leaks.
It seems to be buggy with older NetBSDs.
Is "it" the kqueue code in the kernel (how does this lead to descriptor leaks) or the kqueue-using event code in Dovecot (how does this lead to descriptor leaks).
Dovecot creates a log pipe for each child process. When the child process dies, the log pipe should get a notification that there's new data to be read from the pipe. Then when Dovecot tries to read() it, it returns "end of file" and the pipe gets closed.
Something in the above doesn't work with some NetBSD versions + kqueue and the pipe doesn't get closed.
What can I do to work around the issue?
Remove --with-ioloop=kqueue from the pkgsrc build.
make PKG_OPTIONS.dovecot="gssapi -kqueue pam sasl" update
did the trick (no kqueue support in the build). Hopefully it will now be stable.
-- Viktor.