[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: slapd: warning: cannot open /etc/hosts.allow: Too many open files

Russ Allbery wrote:
David<davidke@whidbey.net>  writes:

The reason for this error is you ran out of file descriptors for the
slapd process.  The default is 1024 for most systems.  To up it for just
slapd you can add:

ulimit -n XXX

Where XXX is the number of file descriptors you want to allow, I use
8192.  Just add this line into the init script for slapd before you
start slapd and this should resolve your issue.

Unless you're using i386 instead of amd64, at which point you'll still run into an upper limit on the select size.

See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=378261 for more
details.  (Advice on whether the solution that I outline there is
supported and reasonable is welcome.)

There's no 32 bit vs 64 bit distinction here. The distinction is whether you built on a newer kernel/glibc that supports epoll() vs an older platform that only supports select(). If you're using epoll() then the FD_SETSIZE definitions are completely irrelevant, and the ulimit is the only controlling factor.
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/