BUG? File descriptor use in cmd_append (for MULTIAPPEND) results
in many open files
rgraves at carleton.edu
Mon Dec 11 13:02:00 EST 2006
Nik Conwell wrote:
> multiple messages being appended). Cyrus-imapd handles this multiappend
> by creating stage files for each appended message and leaving the file
> descriptor open. The problem is that after 240 messages, we run out of
> file descriptors and so an open() of the next stage file fails with
> EMFILE. I updated /etc/cyrus.conf to make the max fds be 1024 (AFAICT
> kernel MAX) which helped somewhat but not for larger mailboxes with >
> 1008 messages.
Excellent troubleshooting. I'm getting worried that I have a problem and
don't know it. Did you get useful error messages (that we can search
The man page for cyrus.conf suggests that the default is 256, but that
the integer value is optional. So if maxfds does not appear in
cyrus.conf at all, is the default 256, or is it unlimited (up to
ulimit)? Looks like the former to me. Ick.
> Shouldn't the multiappend/append be closing the FD for each stage file
> and then reopening it later as it needs it?
Rich Graves <rgraves at carleton.edu>
Sr UNIX and Security Administrator
Ofc 507-646-7079 Cell 952-292-6529
More information about the Info-cyrus