Squid by default on RedHat only uses a maximum number of file descriptors of a meagre 1024.
To increase this:

  • Add lines in the /etc/security/limits.conf file:
    squid soft nofile 20480
    squid hard nofile 20480

  • Add line in the /etc/squid/squid.conf file:
    max_filedesc 20480

  • Add line in the /etc/init.d/squid file:
    ulimit -HSn 20480

  • Restart the squid service:
    service squid restart

This will DEFAULT to the COMPILED setting of 16k file descriptors rather than our selected value of 20K.