RE: max fd's in linux

From: Jordan Mendelson <>
Date: Mon, 5 Oct 1998 15:28:29 -0400

> > You can get around this by setting the open file limit before running
> > configure. Do this with ulimit:
> >
> > ulimit -n 3000
> >
> > You also need to add this line to the RunCache script before
> the line that
> > kicks off Squid.
> Ok, here is what I have now:
> constellation:/usr/src/squid-2.0.RELEASE# ulimit -a
> core file size (blocks) 2097151

Argh, I've reported this buggle as long time ago, the configure script
incorrectly detects the wrong number of FDs. (i think I even posted a
patch.. mm)

With a vanilla Linux 2.1 kernel there are 1024 FDs available by default. The
problem is that OPEN_MAX (and a few other variables) which the configure
script checks are set to 256 and not 1024. This is probably the same problem
you are having with whatever patch you used to increase it to 3000, it
almost sounds like /usr/include/linux/ files are not the patched ones.

This may be considered a bug in Linux, but personally I never saw what was
wrong with just doing an open() loop (which correctly determines number of
FDs under Linux 2.x).

To "fix" it, just edit the config file which sets it to 256, it's something
like include/autoconf.h and says #define SQUID_MAXFD.


Jordan Mendelson     :
Web Services, Inc.   :
Received on Mon Oct 05 1998 - 12:31:26 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:42:20 MST