Re: echo 3072 > /proc/sys/fs/ won't do the trick on Linux 2.2.x

From: Henrik Nordstrom <>
Date: Tue, 12 Oct 1999 00:44:37 +0200

No patching of Squid is required at all.

1. Install Linux 2.2.12 or later.
2. Install glibc 2.1.1 or later (and make sure /etc/nsswitch.conf is
properly configured to not use nis/nis+, see another thread on
dnsservers why)
3. Edit /usr/include/bits/types.h to define __FD_SETSIZE to at least the
number you need.
4. ulimit -HSn 16384 (or whatever number of filedescriptors you need)
5. configure, build and install squid as usual from source.
6. Make sure the above ulimit command is always run prior to starting
Squid, or the kernel will again enforce at most 1024 filedescriptors.

Apart from this you may need to apply various kernel tuning. Excerpt
from the script I use to start Squid on Linux:
        ulimit -HSn 16384
        echo "1024 32768" >/proc/sys/net/ipv4/ip_local_port_range
        echo "16384" >/proc/sys/fs/file-max
        echo "20000" >/proc/sys/fs/inode-max

Henrik Nordstrom
Squid hacker wrote:
> Squid keeps complaining on not enuff file descriptor even though I
> increase the file descriptor size as suggested in FAQ.  Is there any other
> patch for squid-2.2STABLE5 ??? I had used Duane's ipc.c.patch.  If the
> patch was applied, then it will not complain about FD anymore but then it
> will cause failure on the client such that the error message generated
> "Internal squid DNS error" ---> unable to resolve the IP of the URL ....
> Thanks
Received on Mon Oct 11 1999 - 16:58:47 MDT

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