---- Original message ----
>Date: Thu, 30 Nov 2006 15:34:04 -0500
>From: Seth Hanford <[EMAIL PROTECTED]>  
>Subject: Dovecot 1.0rc2p3 "Too many open files"  
>To: misc@openbsd.org
>
>Hello all,
>
>I've just moved my mail server (OpenBSD RELEASE, GENERIC.MP) from using
>Courier IMAP & Cyrus SASL to Dovecot, with Postfix using dovecot-auth
>for SASL. Things have been going OK since around OpenBSD 4.0 release
>time until yesterday. Postfix, dovecot, amavisd et al are installed from
>packages (-RELEASE).
>
>/var/log/maillog is filling up with errors from Dovecot stating "too
>many files open". Just recently, amavisd-new failed saying that it
>couldn't open its lock file. The crazy part is, my server is very low
>traffic. I have 2 mailboxes and about 300 messages / day. My two main
>clients are a Windows XP box with Thunderbird 1.5, where I leave the
>Thunderbird client up constantly. My second client is an OS X system
>running Thunderbird 1.5 and it is open most of the day for my second
>account.
>
>My dovecot.conf is fairly consistent with the distributed example conf,
>but I did add a section to support SASL queries from Postfix. Dmesg and
>dovecot.conf are below.
>
>How do I fix this? It seems like Dovecot is running away with LOTS of
>open files, and the dovecot lists talk about file descriptor leaks for
>later versions, as well as kqueue problems noted in the OpenBSD ports
>tree CVS log. I've seen fstat reporting something like 36+ connections
>for one of my mail accounts when it was just sitting idle. I could
>increase ulimit like many MySQL users have in the past, but this seems
>more like a runaway program to me.
>

i'm having the same problems as the OP, where dovecot opens too many files
and/or won't allow downloading of email via POP or IMAP. this is
dovecot-1.0rc2p3 on 4.0-release, but it appears that dovecot-1.0beta8 from
3.9-release didn't get deleted cleanly (shows up as partial-dovecot-1.0beta8)
when i upgraded. a pkg_delete {partial-dovecot-1.0beta8,dovecot-1.0beta8} gives
me no output and does not remove the pkg from the pkg_info listing. any
suggestions on how to fully remove the 1.0beta8 pkg?

my 1st attempt at fixing this is adding a login class that ups the usual
ulimits, just like for mysqld:

_dovecot:\
    :datasize=1024M:\
    :maxproc=4096:\
    :openfiles-cur=2048:\
    :openfiles-max=8192:\
    :stacksize-cur=16M:\
    :tc=default:

this fixes, at least temporarily, the trouble with number of open files.

other solutions that come to mind, but are not very appealing:

- upgrade mailserver to current or stable to get new dovecot package
- compile dovecot from souce (not clear to me how to get all the nice configure
options that the package uses; any insight here would be nice)

advice as to the best solution is welcome. i'd like to keep this machine as
close to 4.0-release as possible for maintainability purposes.

cheers,
jake

>Thanks,
>Seth
>

Reply via email to