Current squid version has 1024 limit for number of used filedescriptors. It is not enough. My busy proxy needs over 4096 of them. So it would be safe by enabling, let say 8192 (it does no harm to users not using that limit) by following patch: --- ./configure.in.org Tue Sep 2 10:17:16 2003 +++ ./configure.in Tue Sep 2 10:23:08 2003 @@ -1947,7 +1947,7 @@ exit(0); } ], -SQUID_MAXFD=`cat conftestval`, +SQUID_MAXFD=8192, SQUID_MAXFD=256, SQUID_MAXFD=256) AC_MSG_RESULT($SQUID_MAXFD)
Ok ill investigate this after exams.
Fixed in cvs.. Bumped it to 8192 as suggested here, seems reasonable.
I am afraid that bug needs to be reopened. First of all squid misses two fixes - in /etc/conf.d/squid where there should be information changed from # Max. number of filedescriptors to use. You can increase this on a busy # cache to a maximum of (currently) 4096 filedescriptors. Default is 1024. to # Max. number of filedescriptors to use. You can increase this on a busy # cache to a maximum of (currently) 8192 filedescriptors. Default is 1024. It is rather trivial and not so important. Second is about init script, where line 16 should be: [ $SQUID_MAXFD -le 8192 ] || SQUID_MAXFD=8192 But after those obvious fixes there is a problem, still. squid after declaring 8192 descriptors, still uses 4096. Funny thing is that squid taken from another distro (PLD) with 8192 limit compiled in, works fine. I am guessing it is also some trivial change, but can't figure it out.
I did additional "research" on that issue and I can tell that not supporting more than 4096 descriptors is caused by building process when emerging. There are no problems with pure squid sources, which accept 8192 descriptors. I am doing this by issuing 'ulimit -HSn 4096 && ./configure' and it works fine after building and installing. Tried doing the same inside of squid of ebuild, but it does not work as expected (no more than 4096 descriptors, even if squid started manually and not by init.d script).
OK. I found it! It is really trivial. In few minutes I will attach proper patch that does following: - remove unneeded part of patch that changes SQUID_MAXFD in configure.in (which was mentioned in my first post) - change description in /etc/conf.d/squid telling that current limit is 8192 filedescriptors - change initscript so it can handle 8192 squid - change 129 line of ebuild, which sets the limit - fixes files digests Please apply that patch ASAP :).
Created attachment 47112 [details, diff] Support for 8192 filedescriptors
patch is in cvs