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

too many open files (ITS#142)



Full_Name: Don Badrak
Version: 1.2.1-Released
OS: IRIX 6.5.3
URL: 
Submission from: (NULL) (148.129.129.8)


All,

Things have been running swimmingly under OpenLDAP 1.2.1 until recently.  I got
an error
for "too many open files".  The default process limit under IRIX 6.5.x is 200
(rlimit_nofiles_max=200).  It is changable using sysconf() or from the shell
(limit descriptors 500).

Here is an excerpt from the log file where it failed.  The next connection after
199
didn't succeed, and there were lots of the accept() failure lines until I
restarted the daemon.

Apr 21 10:36:20 7U:postal slapd[2108438]: conn=5503 op=2 UNBIND
Apr 21 10:37:00 7U:postal slapd[2108438]: conn=5504 fd=199 connection from
unknown (148.129.239.147) accepted.
Apr 21 10:37:00 7U:postal slapd[2108438]: conn=5504 op=0 BIND dn="" method=128
Apr 21 10:37:00 7U:postal slapd[2108438]: unknown version 3
Apr 21 10:37:00 7U:postal slapd[2108438]: conn=5504 op=0 RESULT err=2 tag=97
nentries=0
Apr 21 10:37:00 7U:postal slapd[2108438]: accept() failed errno 24 (Too many
open files)

This is the output from monitor:
% ldapsearch -s base -b "cn=monitor" "objectclass=*"      

CN=MONITOR
version=slapd 1.2.1-Release (Thu Apr  8 16:22:51 EDT 1999)
threads=1
connection=6 : 19990423185255Z : 1 : 1 : NULLDN :
connection=20 : 19990423203636Z : 1 : 1 : NULLDN :
connection=21 : 19990423200652Z : 1 : 1 : NULLDN :
connection=25 : 19990426201232Z : 1 : 1 : NULLDN :
connection=26 : 19990423203653Z : 1 : 1 : NULLDN :
connection=27 : 19990426201245Z : 1 : 1 : NULLDN :
connection=28 : 19990427113006Z : 1 : 1 : NULLDN :
connection=29 : 19990426204703Z : 1 : 1 : NULLDN :
...

connection=130 : 19990427174614Z : 1 : 1 : NULLDN :
connection=131 : 19990427180402Z : 1 : 1 : NULLDN :
connection=132 : 19990427180405Z : 2 : 1 : NULLDN :
currentconnections=107
totalconnections=3317
dtablesize=200
writewaiters=0
readwaiters=0
opsinitiated=8773
opscompleted=8772
entriessent=52941
bytessent=12381528
currenttime=19990427180405Z
starttime=19990421144035Z
nbackends=2

I edited out some of the connections.  I'm wondering why they are not going
away.  Some 
have been there for more than 4 days.  Are there some process settings I can
make, or
system parameters to tune, or even some flags to set on the sockets to make
these
things go away quicker (it is probably from stupid MS clients).  I can increase
the
limits, but it'll continue to happen, just taking longer to get there.

Here are the default limits:

% limit
cputime         unlimited
filesize        unlimited
datasize        2097152 kbytes
stacksize       65536 kbytes
coredumpsize    unlimited
memoryuse       379376 kbytes
vmemoryuse      2097152 kbytes
descriptors     200
threads         1024

My netstat table is large, too, where it believe them all to be connected.  Here
is a
sample of that, too:
tcp        0      0  148.129.238.22.389     148.129.239.128.2336   ESTABLISHED
tcp        0      0  148.129.238.22.389     148.129.238.106.4759   ESTABLISHED
tcp        0      0  148.129.238.22.389     148.129.40.199.2225    ESTABLISHED
tcp        0      0  148.129.238.22.389     148.129.40.199.2227    ESTABLISHED
tcp        0      0  148.129.238.22.389     148.129.238.49.1033    ESTABLISHED
tcp        0      0  148.129.238.22.389     148.129.238.49.1035    ESTABLISHED
tcp        0      0  148.129.238.22.389     148.129.238.49.1036    ESTABLISHED
tcp        0      0  148.129.238.22.389     148.129.238.49.1041    ESTABLISHED
tcp        0      0  148.129.238.22.389     148.129.238.49.1045    ESTABLISHED
tcp        0      0  148.129.238.22.389     148.129.238.49.1047    ESTABLISHED
tcp        0      0  148.129.238.22.389     148.129.238.49.1051    ESTABLISHED
tcp        0      0  148.129.238.22.389     148.129.238.49.1066    ESTABLISHED
tcp        0      0  148.129.238.22.389     148.129.238.111.1056   ESTABLISHED
tcp        0      0  148.129.238.22.389     148.129.238.111.1058   ESTABLISHED
tcp        0      0  148.129.238.22.389     148.129.238.111.1065   ESTABLISHED

Any ideas?  Anyone seen this before?  I don't see this behaviour under Linux or
Solaris.

Don
---
Don Badrak <dbadrak@census.gov>              301.457.8263 work
Telecommunications Office                    301.457.4438 fax
U.S. Bureau of the Census
Suitland MD, USA