[Dovecot] too many open files error when using quota plugin
With the quota plugin loaded (even with a quota value of 0), I get errors like the following:
open(/var/mailstore/01/1a/301620/Maildir/cur/1169654988.P22440Q0M696852.<hostname stripped>,S=4437552:2,Sbc) failed: Too many open files
To do this, I have a folder with about 700 messages and I tell Thunderbird to run junkmail controls on it (fetches all messages). Watching an strace on the imap process I'm connected to, the problem seems to be when the plugin goes to close the maildirsize file, it's not closing the correct file descriptor:
open("/var/mailstore/01/1a/301620/Maildir/./maildirsize", O_RDWR|O_APPEND) = 1016 read(1016, "1024S\n395 1\n397 1\n", 5120) = 18 read(1016, "", 5102) = 0 close(4294967295) = -1 EBADF (Bad file descriptor)
It closes that same descriptor every time.
On a side note, I'm just curious why it needs to read the maildirsize file for a fetch request anyway?
On Wed, 2007-01-24 at 11:44 -0500, Justin McAleer wrote:
open("/var/mailstore/01/1a/301620/Maildir/./maildirsize", O_RDWR|O_APPEND) = 1016 read(1016, "1024S\n395 1\n397 1\n", 5120) = 18 read(1016, "", 5102) = 0 close(4294967295) = -1 EBADF (Bad file descriptor)
Thanks for the strace, I had tried to find this bug earlier also, but I didn't then notice the problem. Fixed here: http://dovecot.org/list/dovecot-cvs/2007-January/007518.html
On a side note, I'm just curious why it needs to read the maildirsize file for a fetch request anyway?
Hmm. Yea, that's a bit pointless. I should change the code to delay the quota counting until it's really needed.
Timo Sirainen wrote:
Thanks for the strace, I had tried to find this bug earlier also, but I didn't then notice the problem. Fixed here: http://dovecot.org/list/dovecot-cvs/2007-January/007518.html
Awesome, I was going to try that myself but it was lunchtime ;) Just confirming that I'm no longer getting the errors.
participants (2)
-
Justin McAleer
-
Timo Sirainen