On Sun, Oct 20, 2013 at 08:27:31PM +0100, Stuart Henderson wrote:
> On 2013/10/20 17:48, Matthieu Herrb wrote:
> > Hi,
> > 
> > the default configuration of dovecot fails to start here with the
> > default login.conf. I get lots of "Too many open files" errors. 
> > 
> > After applying the recipe in pkg-readmes/dovecot to setup a dovecot
> > login class with a higher openfile-cur value,  it does indeed
> > start. 
> > 
> > Could it be possible to either provide a default dovecot config which
> > opens less files (I see 160 open fd on the main dovecot process after
> > startup, with no clients connected), or have the package setup the
> > proper login class with a high enough openfile-cur value ? 
> > 
> > TIA
> > -- 
> > Matthieu Herrb
> > 
> 
> Hmm, the README isn't sufficiently strict, it says "On a busy server [...]"
> so as a minimum we need to fix that (diff below).

FWIW, I'm ok with that patch if other ways are too complicated.

> 
> We don't have any automated way to let packages add fragments to login.conf.
> Forcing limits via the rc.d script could work, though we can't just use
> a custom rc_start() that raises ulimit -n, it needs to add to what's
> already set for the dovecot class rather than override it completely
> so I think we'd need a separate script which raises the limit, and have
> rc.d/dovecot call that script instead of /usr/local/bin/dovecot.
> 
> For your other suggestion of changing defaults in Dovecot, reducing
> auth_worker_max_count helps a little, though it's still pretty tight,
> we might just get it good enough for a single-user mailhost but it's
> not going to be good enough for any serious use.
> 
> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/mail/dovecot/Makefile,v
> retrieving revision 1.213
> diff -u -p -r1.213 Makefile
> --- Makefile  27 Sep 2013 01:35:51 -0000      1.213
> +++ Makefile  20 Oct 2013 19:12:52 -0000
> @@ -10,6 +10,7 @@ COMMENT-postgresql= PostgreSQL authentic
>  # Bump dovecot-pigeonhole every time you update to a new Dovecot version.
>  V_MAJOR=     2.2
>  V_DOVECOT=   2.2.6
> +REVISION-server=0
>  
>  DISTNAME=    dovecot-${V_DOVECOT}
>  PKGNAME=     dovecot-${V_DOVECOT}
> Index: pkg/README-server
> ===================================================================
> RCS file: /cvs/ports/mail/dovecot/pkg/README-server,v
> retrieving revision 1.1
> diff -u -p -r1.1 README-server
> --- pkg/README-server 1 Jul 2012 10:26:35 -0000       1.1
> +++ pkg/README-server 20 Oct 2013 19:12:52 -0000
> @@ -5,9 +5,9 @@ $OpenBSD: README-server,v 1.1 2012/07/01
>  +-----------------------------------------------------------------------
>  
>  By default, the _dovecot user, and so the Dovecot processes run in
> -the login(1) class of "daemon". On a busy server, it may be advisable
> -to put the _dovecot user and processes in their own login(1) class
> -with tuned resources, such as more open file descriptors etc.
> +the login(1) class of "daemon". The default limits on file descriptors
> +are insufficient to run Dovecot; instead you should put the _dovecot
> +user and processes in their own login(1) class with tuned resources.
>  
>  For example, add this to the login.conf(5) file:
>  

-- 
Matthieu Herrb

Reply via email to