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

Re: too many open files



On Thursday, 22 April 2010 13:10:03 Hugo Monteiro wrote:
> Hello list,
> 
> Although the subject suggests a fairly know issue, i cannot seem to
> understand the cause.
> 
> Log file presents
> 
> Apr 22 12:57:36 proxyldap1 slapd[1511]: warning: cannot open
> /etc/hosts.allow: Too many open files
> Apr 22 12:57:36 proxyldap1 slapd[1511]: warning: cannot open
> /etc/hosts.deny: Too many open files
> 
> , but
> 
> proxyldap1:~# cat /proc/sys/fs/file-max
> 100000
> proxyldap1:~# cat /proc/sys/fs/file-nr
> 1088    0    100000
> proxyldap1:~# lsof -p `pidof slapd`| wc -l
> 460

And 'grep files /proc/`pidof slapd`/limits' ?

> proxyldap1:~# su -c "ulimit -n" openldap
> 8192
> 
> slapd is version 2.4.17-2 (Debian Unstable) and is running on a xen vm,
> using 64bit kernel 2.6.26-2-xen-amd64 in a Debian Lenny system.
> 
> Have i overlooked any aspect?

The preceding lines, showing the ACCEPT lines with the fd number, prior to the 
"Too many open files" error would have been useful.

I recently tested (in the "max open files" thread from March), and found that 
with tcp_wrappers, I could get more than 4000 connections (with ulimit -n set 
to 4096).

You may want to review some Debian bug reports, specifically this one, which 
also has a script you can use to test with:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=378261


Regards,
Buchan