Which version of squid are you using? If your are using a 2.4 series =
from RedHat most likely squid will not be able to go over the 1024 limit =
without being patched (I found this out the hard way). squid 2.5 stable5 =
has the patch. I am not sure when the squid developers put it in. Once =
you get a version of squid that has the patch you need to set your =
ulimit to the max number of file descriptors your want your squid to =
able to use (from the command line) then compile.

Like so:
# ulimit -HSn 8192 (I used 8192)
# ./configure ...
# make=20
# make install

Then do/verify the following:
1. Change the init script so it sets the limit to 8192 (or whatever =
number you pick) before running squid.
2. Verify /proc/sys/fs/file-max is set high enough (mine was by default)
3. Set /etc/security/limits.conf to allow the squid userid to use up to =
8192 file descriptors.

That should do it.


-----Original Message-----
From: Mathew Thomas [mailto:mathew.thomas@rmit.edu.au]
Sent: Thursday, April 15, 2004 7:52 PM
To: squid-users@squid-cache.org
Subject: [squid-users] Increasing Filedescriptors on Linux - WARNING!
Your cache isruuning out of filedescriptors


I am bit confused about increasing the filedescriptors. My two proxy =
server's cache.log is flooded with the error
"WARNING! Your cache is running out of filedescriptors". I could see =
from the Cache Manager that squid is using only
1024 FD.=20
I read the Henrik document at the web site =

I have got few question about increasing the Filedescriptors: Below the =
questions are my current (default) values:

1) Do I need to increase the value in /proc/sys/fs/file-max? Another =
2) How much can I increase the vale for " ulimit -HSn ####" without =
causing any performance degradation?
3) Regarding the step "Edit /usr/include/bits/types.h to define =
__FD_SETSIZE ....". Which value should I put it here -
the value in "cat /proc/sys/fs/file-max" or the value in " ulimit -HSn =
####" ?
4) Is the default value below for =
"/proc/sys/net/ipv4/ip_local_port_range" , the " =
and " cat /proc/sys/kernel/threads-max" alright or should I increase =

My system : Red Hat ES 3.0, Kernel - 2.4.21-9.0.1, glibc version =
2.3.2-95.6 ( System: HP ML 530 with 2x3.0GHz Xeon
CPU, 8GB Mem 6x35GB for cache)=20
#cat /proc/sys/fs/file-max
#cat /proc/sys/net/ipv4/ip_local_port_range
32768 61000
#cat /proc/sys/net/ipv4/tcp_max_syn_backlog
# cat /proc/sys/kernel/threads-max

Info from Cache Manager
File descriptor usage for squid:
Maximum number of file descriptors: 1024
Largest file desc currently in use: 780
Number of file desc currently in use: 729
Files queued for open: 0
Available number of file descriptors: 295
Reserved number of file descriptors: 100
Store Disk files open: 43

Thanks in advance for the help.

RMIT University