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

Re: Problem with file descriptors limit



On Monday 26 June 2006 19:35, Guilherme Mundim Torres wrote:
> Hello Aaron,
>
> thank you for the sun´s link! I executed the code on my server, but it
> returned de number 8189. :/ I used ldap user to execute it.
>
> I really don´t understand why sometimes my slapd is reaching a "1024 open
> files limit".

It's imposed by the kernel. Run 'ulimit -n 4096' in the init script before 
starting slapd, and you will then be able to reach the compiled-in limits in 
OpenLDAP, which you should do before the hints below:

>
> What do you think about the two links below? Can they help me?
>
> http://www.openldap.org/lists/openldap-software/200510/msg00051.html
> "Yes, you need to recompile slapd/daemon.c with an appropriate value
> #define'd for FD_SETSIZE. You probably need to explicitly #undef it first
> to remove the default value that glibc uses."
>
>
> http://www.openldap.org/faq/data/cache/1126.html
> "env CPPFLAGS="-DOPENLDAP_FD_SETSIZE=8192" ./configure
> will cause FD_SETSIZE to be set to 8192. "
>
> Best Regards
>
> Aaron Richton escreveu:
> >> It seems that the problem is about slapd limits.
> >
> > It's unlikely to have a problem with slapd limits. slapd itself can
> > easily scale to many thousands of connections (likely more if given
> > enough resources). But a common issue is that libwrap uses fopen(), which
> > sometimes can't handle as many fds as some other calls.

However, libwrap shouldn't have many files open. IME, it seems when libwrap 
complains about open file limits, it's just the most visible file limit 
error.

> >
> > Now, on Linux, open() and fopen() are the same limit in my experience.
> > That "same limit" should be the value set by ulimit -n. (There's a stress
> > program at http://access1.sun.com/technotes/01406.html that might be a
> > good test exercise.)
> >
> >
> > If you're setting ulimit -n and still not getting desired results, I'd
> > wonder if either:
> >
> > * whatever means you're using of starting slapd is overwriting the limit.
> > maybe steal your slapd init script and replace it with the stress
> > program.
> >
> > * do you actually have 8,192 (or whatever) files open? Try
> >  ls /proc/`cat slapd.pid`/fd | wc
> > when libwrap is complaining.
> >
> >
> > With all this said, I've seen libwrap issues before, but the server
> > doesn't crash. You might have something more evil going on; might be
> > worth filing with SuSE.

-- 
Buchan Milne
ISP Systems Specialist
B.Eng,RHCE(803004789010797),LPIC-2(LPI000074592)

Attachment: pgpmWgL52Kos7.pgp
Description: PGP signature