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

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



On Mittwoch, 11. Juni 2008, Andreas Moroder wrote:
> Hello,
>
> today a client to connect via ftp to our server ( SLES 9 ) and I got
> this error:
>
> slapd[26189]: warning: cannot open /etc/hosts.allow: Too many open
> files
>
> according to lsof | grep REG | wc -l i have only  3267 regular files
> open and 4684 counting the IP connections too.
>
> cat /proc/sys/fs/file-nr returns
> 3573    1185    131072
>
> and file-max 131072 ( as above )
>
> According to this numbers there sould not be a system wide problem.
>
> Is there a limit of open files in slapd ?
I guess your are hitting the default per-process limit. Thats defaults 
to 1024 on SLES9 IIRC (see ulimit -n). But increasing that limit might 
not help you much as the OpenLDAP Version shipped with SLES9 is using 
select() to manage its connections and select() which can handle only 
1024 filedescriptors by default. So you'll probably run into other 
issues.
You best bet is probably to update to a more recent OpenLDAP Version. 
Which do not use select() anymore. Newer OpenLDAP releases for SLES9 
are offered e.g. through the openSUSE Buildservice. 
http://download.opensuse.org/repositories/OpenLDAP/SLES_9/

Alternatively you could try to get the number of open connections down. 
Depending on your enviroment it might be enough to set an idletimeout 
in slapd.conf to let the server close unused open LDAP connections 
after a timeout.

> I restarted slapd and now it seems to work.
>
> Probably you need to know the version. Can anyone tell me how I get
> the running version ? There are no entries in /var/log/messages

-- 
Ralf