On 25/06/2014 5:01 a.m., Matthew Ceroni wrote:
> Hi:
>
> I am running squid version 3.3.8 on CentOS v6.5.
>
> I have an issue regarding file descriptors. Our proxy has run into an
> issue the past few days (everyone streaming FIFA soccer I believe)
> where we receive the following error:
>
> WARNING! Your cache is running out of filedescriptors
>
> At this point the CPU usage of each squid worker spikes to 100% and
> the SNMP agent becomes unavailable.
>
> I was able to get some information from squidclient mgr:info.
>
> My question is around the file descriptor statistics:
>
> When the issue is happening it reports:
>
> File descriptor usage for squid:
> Maximum number of file descriptors: 16384
> Largest file desc currently in use: 548
> Number of file desc currently in use: 540
> Files queued for open: 0
> Available number of file descriptors: 15844
> Reserved number of file descriptors: 100
> Store Disk files open: 0
>
> After a restart of squid it reports the following:
>
> File descriptor usage for squid:
> Maximum number of file descriptors: 65536
> Largest file desc currently in use: 516
> Number of file desc currently in use: 475
> Files queued for open: 0
> Available number of file descriptors: 65061
> Reserved number of file descriptors: 400
> Store Disk files open: 0
>
>
> The ulimit setting for the OS is 8192 for open files. According to the
> documentation for max_filedescriptors (which I don't have set in my
> squid.conf) the default value is the ulimit value. Therefore why on
> first startup does it list the max FD of 65k? Also, when the issue
> arises why does it end up dropping to 16k? According to the output
> above there is at any point roughly only 1k FD in use, so why is squid
> reporting that it is running out of FD?
>
On system startup the user initiating Squid is "root". The set of FD
limits applicable to root user are used. On later actions the proxy
low-privilege user account is used and a different set of limits apply
there.
The squid.conf directive value can be set if it is either smaller than
the limit the user account permits, OR if the user account has
permission to raise the value.
There are also undetermined questions about whether there are bugs in
the logic finding the FD limit.
PS. are you running with SMP workers? The 3.3 squid versions display FD
numbers summing the workers FD limits together and the log entry is made
if any one worker (or disker) reaches capacity.
Amos
Received on Wed Jun 25 2014 - 11:37:58 MDT
This archive was generated by hypermail 2.2.0 : Thu Jun 26 2014 - 12:00:05 MDT