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

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

> From:  Jan-Michael Ong <jmong@adobe.com>
> Date:  Tue, 18 Dec 2001 08:14:10 -0800
> 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

I'm running linux, but I'll look and see what the limits are.  However, it 
seems to me that I've got a lot more established connections than I can 
explain by the stuff that calls LDAP, so I'd rather clean up the calls than 
increase the limits.

I guess I'd better go through my own code and make sure that I'm properly 
unbinding from ldap.

> 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.

Are you willing to share the script?  I've been using  perl-ldap-0.24, but I 
can either also install PerlLDAP or modify it to use perl-ldap.

> 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?
> Thanks
> jm
> here are some links that i read:
> http://www.unixguide.net/sun/faq/3.45.shtml
> http://www.openldap.org/lists/openldap-bugs/199904/msg00076.html
> http://www.openldap.org/lists/openldap-bugs/199904/msg00078.html
> 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

I run squid, but not on any of the boxes that his has happened on, and the 
boxes that have Squid aren't doing ldap calls.


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

Attachment: pgpUm79ttmpu6.pgp
Description: PGP signature