Re: too many open files
Klemens Kittan <[email protected]> Fri, 30 Apr 2010 12:16:09 +0200
| Newsgroups | gmane.network.openldap.general |
|---|---|
| Message-ID | <[email protected]> |
--=-wIqK3CuYv3/ZVVltXe5p
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
Hello,
don't want to discourage you, but my slapd (2.4.11 on Debian Lenny)
still has problems with more than 1024 files.
I have
-- ulimit -n 4096 in /etc/default/slapd
-- checked the output of /proc/`pidof slapd`/limits
-- downloaded the source package from Debian (version 2.4.11),
did a grep for FD_SETSIZE and found that it is set to 4096
-- built a new package from these sources with configure options:
--disable-tcpwrapper
In a loop from a python script, I then connect, bind, search the ldap
server and keep all the connections open, like so:
...
def ldap_connection_func():
global n
l =3D ldap.initialize("ldaps://ldap...")
l.simple_bind_s(username, password)
l.search_s('dc=3Dhaiti,...', ldap.SCOPE_SUBTREE, 'objectclass=3D*')
n.append(l)
for x in range(0,1100):
ldap_connection_func()
...
I see the number of open files of the slapd process rise to about 1080,
then all connections opened from the script are closed while slapd keeps
running.=20
We now will try to set the idletimeout parameter to some sensible value
>0. Hopefully, this will not lead to trouble with syncrepl.
Klemens
On Fri, 2010-04-23 at 16:59 +0100, Hugo Monteiro wrote:=20
> On 04/23/2010 11:55 AM, Buchan Milne wrote:
> > And 'grep files /proc/`pidof slapd`/limits' ?
> >
> > =20
>=20
> Bingo.
>=20
> proxyldap1:~# grep files /proc/`pidof slapd`/limits
> Max open files 1024 1024 files
>=20
>=20
> Now this i don't undestand. Howcome is this value set to 1024 while i=20
> defined 8192 for nofile in /etc/security/limits ?
>=20
> So now i added ulimit -n 4096 to /etc/default/slapd and i restarted the=20
> server.
> I now get a proper value in /proc/`pidof slapd`/limits.
>=20
> Now it's wait and see, but i'm feeling confident.
>=20
> Thank you for your help.
>=20
> Hugo Monteiro.
>=20
--=20
Klemens Kittan
Systemadministrator
Uni-Potsdam, Inst. f. Informatik
August-Bebel-Str. 89
14482 Potsdam
Tel. : +49-331-9773125
Fax. : +49-331-9773122
eMail : [email protected]
gpg --recv-keys --keyserver wwwkeys.de.pgp.net 6EA09333
--=-wIqK3CuYv3/ZVVltXe5p
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEABECAAYFAkvareMACgkQZ1HXi26gkzOA8ACghydrztW6C/BWuAqjd7/IWK6y
6XwAoJnWd4wLRUsWsDz0E/cYkQGeVef8
=oPDa
-----END PGP SIGNATURE-----
--=-wIqK3CuYv3/ZVVltXe5p--