[Date Prev][Date Next]
Re: Ldap Crashing
On Thu, 12 Sep 2002 17:03:32 +0200
Bjørn Ove Grøtan <email@example.com> wrote:
> > I have been having a problem with slapd crashing after about
> > a day or 2. It seems to be directly related to the amount of
> > files that are open. When ldap and skyrixgreen the web interface
> > are restarted it seems to work fine. Stating that slapd has about
> > 200 or 300 files open. This number climbs steady throughout the
> > day until it reaches around 35,000 at which time the server will
> > stop functioning. lsof | grep -c slapd is the command I've used
> > to check the number of files but I'm new to linux administration
> > so I'm not sure how to find out more about the files. Has anyone
> > experienced this before and if so what seemed to be the solution.
> > How might I get a more in depth look at the open files that aren't
> > being closed?
> You need to increase the max number of open files for your Linux kernel.
> See section 8.14 of the Linux Kernel-HOWTO.
> echo 65535 > /proc/sys/fs/file-max
> (also put this into your rc.local or something as it will be reset at
This seems rather excessive. The experience I'm having is that a
working 2.0.x directory can be quite happy with under 300 open
descriptors. (300,000 to 400,000 connections per day) The default
(for our linux system) of 1024 descriptors seems very reasonable.
We have noticed a bad condition where a something gets deadlocked,
causing modifies to hang indefinitely. After a while of this, it can
escalate to searches and binds being deferred. Once that happens,
slapd accepts connections until it runs out of fd's and chokes. I
haven't filed an ITS as I haven't been able to pinpoint the
problem. (2.0.25, back-ldbm, seen on both bdb 3 and 4)
Raising the fd limit in This case at least would serve no purpose...
I haven't been able to duplicate that problem with 2.1.4 yet, but I
haven't subjected 2.1.4 to quite the same abuse yet either.