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

Re: daemon: accept(6) failed errno=24 (Too many open files)

I had a similar problem and it happens every so often. The frequency varies. Sometimes 2 or 3 times a day on other days it won't happen until 3 or 4 weeks later. I think for some reason there seems to be some upper bound limit of file descriptors assigned to a process. Scouring the Internet, I found an old post that someone had written about this. The recommendation was to increase the number of file descriptors allowed to the process. For our systems, (Solaris 2.7), I did it by editing /etc/system. I added the following at the bottom of my /etc/system file

* increase the number of maximum file descriptors per process
set rlim_fd_max = 4096

and rebooted the machine using reboot -dl -- r

and so far the performance has been good (knock on wood). I've also written a massive perl script that checks ldap every 5 minutes. It uses perldap 1.4.1 (http://www.perldap.org) and runs a query against ldap every 5 minutes. If it finds the entry then its well and good otherwise it tries three more times. If it fails, it automatically restarts ldap.

hope that helps.

I do wish that someone more intelligible in how openldap works would explain what's actually happening. For anyone who maybe reading this post, if you have any clue could you post it online please?



here are some links that i read:

there were some others, I went to google and ran multiple searches for the error message and read a few more news posts. also check squid. even if you're not using it, i read an article once that mentioned this problem with openldap and squid

At 09:13 AM 12/18/2001 -0600, Chris Garrigues wrote:
> From: "Chris Garrigues" <cwg-oldap-sw@deepeddy.com>
> Date: Sat, 15 Dec 2001 16:55:28 -0600
> I've recently updated a number of things including LDAP and now my slapd has
> been freezing with this in the log fairly regularly:
> Dec 15 16:48:12 pecan slapd[24096]: daemon: accept(6) failed errno=24 (Too many open files)
> Dec 15 16:48:19 pecan last message repeated 2 times
> A restart of slapd clears the problem, but....
> The LDAP upgrade was from 2.0.14 (which I'd built myself) to 2.0.18-2 from the
> RedHat RPM.
> When this first started happening, I set threads to 64 thinking that maybe I
> didn't have enough processes or something. Clearly I was on the wrong path
> because that didn't help.
> It really did seem to start happening concurrently with the update. Any ideas?

This happened again today and I got the output of "lsof|grep ldap" which
you'll find at:


I'd originally tried to include it in my mail, but mojordomo rejected it for
being too big.

I'd really appreciate it if someone could provide me with a clue.


Chris Garrigues                 http://www.DeepEddy.Com/~cwg/
virCIO                          http://www.virCIO.Com
716 Congress, Suite 200
Austin, TX  78701               +1 512 374 0500

  My email address is an experiment in SPAM elimination.  For an
  explanation of what we're doing, see http://www.DeepEddy.Com/tms.html

    The Greatest tragedy in mankind's entire history may be the
      hijacking of morality by religion.  However valuable -- even
      necessary -- that may have been in enforcing good behavior on
      primitive peoples, their association is now counterproductive.
      Yet at the very moment when they should be decoupled,
      sanctimonious nitwits are calling for a return to morals based
      on superstition.
                                --- Arthur C. Clarke