Re: file descriptors for squid using linux 2.2.1

From: Martin Hamilton <martin@dont-contact.us>
Date: Tue, 23 Feb 1999 16:06:02 +0000

-----BEGIN PGP SIGNED MESSAGE-----

Marlon Anthony Abao writes:

| i just installed squid on a new box running linux kernel 2.2.1 and squid
| complains that my kernel does not have enough file descriptors (only 256).
| checking Default FD_SETSIZE value... 1024

If you rebuild your Linux kernel using Alan Cox's -ac patches (from
<URL:ftp://ftp.linux.org.uk/pub/linux/alan/2.2>), you get the ability
to dynamically alter the per-process file descriptor limit with
(u)limit, and go over the 1024 file descriptor limit which is hard
coded into the 2.2 kernel. Make sure you set the hard limit (e.g.
'ulimit -nH' with the bash shell) before building Squid.

Note that when you run ./configure you'll still see something like
this (for a hard limit of 8192) ...

  checking Default FD_SETSIZE value... 1024
  checking Maximum number of filedescriptors we can open... 8192

There's a bit in main() in src/main.c of Squid 2.[12] which says:

    if (FD_SETSIZE < Squid_MaxFD)
        Squid_MaxFD = FD_SETSIZE;

You can either comment this out (which is what I did) or hack at the
definition for FD_SETSIZE in your header files. If you don't, Squid
will report 1024 file descriptors.

It would be nice if Squid didn't do this, but I'm not sure what the
best approach is to fix it...

Sayonara!

Martin

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQCVAwUBNtLR59ZdpXZXTSjhAQFbqAQAkCpkFuQRqkgAi1ZP7eiMll+5Ei9nGp1/
DDh0fk/miWrIFFw4o+ZhdZsgvA2n2GuwaKlW3wCbHY4iVCyhzHK76EbPKfYS+F3K
I0j4yBVXq9hVHKxNkCOUBVrvRPuZpWfa0XHVu23L4s3w1wYJcp1ukQZW+s9HuQv/
lFMdb6pj3Uo=
=ciYy
-----END PGP SIGNATURE-----
Received on Tue Feb 23 1999 - 09:18:33 MST

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