Re: MAXFD frustrations

From: Miquel van Smoorenburg <>
Date: Tue, 4 Dec 2001 11:46:49 +0100

According to Henrik Nordstrom:
> Still true. See
> Short version: Increasing the FD_SETSIZE on Linux requires hand-editing
> the __FD_SETSIZE definition /usr/include/bits/types.h and to set the
> ulimit in your shell... The kernel is neutral, the C library is
> neutral, but the include files are not...

There is a way which I'm using in the squid-2.4 Debian package. It's
ugly and it assumes too much knowledge about the glibc include
files but it does work. Patch is attached.

Ofcourse you need to up ulimit -n before running configure, that
is 1024 by default and can only be increased by root.

The fix I use for *that* is that in the debian packaging build scripts
I run configure first and then I use sed to change SQUID_MAXFD to 4096.
This works fine, squid tests the ulimit value at startup anyway and if
it's lower at runtime it will use the lower value.

> It probably would also be wise to bugger the GNU Libc people a little
> about making FD_SETSIZE configurable like most other OS:es..



"Only two things are infinite, the universe and human stupidity,
 and I'm not sure about the former" -- Albert Einstein.

Received on Tue Dec 04 2001 - 03:46:52 MST

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