[BlueOnyx:02269] Re: Dovecot issues?

Gregg greggk1 at cox.net
Sun Aug 30 16:16:58 -05 2009


Hi Gregg,

> Recently I have noticed in the mail lot a lot of weird errors.
>
> dovecot: pop3-login: Can't connect to auth server at default: Too many
open
> files
> dovecot: imap-login: socket(default) failed: Too many open files

I haven't seen this problem on any box yet, so I don't quite know why you're

running into it.

What does "lsof -nu dovecot|wc -l" report at the time of the error?

That command shows how many files Dovecot has open.

There is a hard OS limit that limits how many files any given process may
hold 
open. That limit is 1024 files and is defined on a kernel level.

Work around:

$ cd /proc/sys/kernel
$ echo "4096"  >file-max
$ echo "12288" >inode-max

That increases the maximum number of open files to 4096. But inode-max also 
needs to be increased. As a rule of the thumb it should be 3-4x higher than 
"file-max". These changes are only temporary until the next reboot. Unless
you 
stuff them into a server startup script that gets executed when the server 
starts.

Alternatively a recompiled kernel can also fix this. In that case NR_FILE
and 
NR_INODE in include/linux/fs.h need to be adjusted. But that shouldn't be 
necessary.

Thanks for the info so far.
Ok, the lsof command did not work on my system, however I still believe I'm
killing the network connection myself.  I have recently allowed 4 days of
email to remain on the server.  I noticed now that when I'm POPPING that
account, I get one dovecot POP for each of the messages that are on the
server still.  Could this be true? I'm using outlook to pop, and when I pop
the user gregg, I get like 20 or 30 instant pops.  I just uninstalled dfix
because I wanted to upgrade to the latest, and now I'm not getting
disconnected from ssh at least when I pop.  So I figure that I have a few
different problems going on here :) 1st, is that I open too many pop
requests at once with one user, second is that I think dfix was killing my
SSH connection when I popped, maybe because I was opening up so many
connections.  Is this possible?





More information about the Blueonyx mailing list