Re: [squid-users] running out of filedescriptors

From: Mike Rambo <mrambo_at_lsd.k12.mi.us>
Date: Tue, 26 Jan 2010 14:36:50 -0500

Landy Landy wrote:
>
> --- On Tue, 1/26/10, Mike Rambo <mrambo_at_lsd.k12.mi.us> wrote:
>
>> From: Mike Rambo <mrambo_at_lsd.k12.mi.us>
>> Subject: Re: [squid-users] running out of filedescriptors
>> To: "Landy Landy" <landysaccount_at_yahoo.com>
>> Cc: "Squid-Users" <squid-users_at_squid-cache.org>
>> Date: Tuesday, January 26, 2010, 11:48 AM
>> Landy Landy wrote:
>>> I restarted squid and it comes up ok. But I still
>> get:
>>> With 1024 file descriptors available
>>>
>>> 2010/01/26 10:27:43| Starting Squid Cache version
>> 3.0.STABLE20 for i686-pc-linux-gnu...
>>> 2010/01/26 10:27:43| Process ID 2768
>>> 2010/01/26 10:27:43| With 1024 file descriptors
>> available

(SNIP)

>>>
>>>
>>>
>> Unless I'm totally missing it there isn't anything in this
>> particular log that indicates a shortage of file
>> descriptors. I do notice your redirectors are exiting
>> though. I'd suggest running squid without the redirector
>> just to see if the cache itself will stay up and process
>> traffic that way. If it does it implies the problem is with
>> the redirector.
>>
>> If you actually *are* running out of file descriptors and
>> it just isn't identified in this particular log, and if you
>> can't do anything with ulimit and recompiling squid to use
>> more FD's as others have suggested, you can try setting
>> persistent connections to off as that will reduce the FD
>> pressure on squid.
>>
>> server_persistent_connections off
>> client_persistent_connections off
>>
>
> This actual log doesnt show any error since is a new reboot and squid doesn't have any problems after a reload. The actual error is on a previous post.
>
> Now, which are the pros and cons of enabling
>
> server_persistent_connections on
> client_persistent_connections on
>

They are enabled by default. We have had them disabled (at Henrik's
suggestion) for several years now because of that exact FD problem when
we first deployed squid. Since that original deployment we have
increased the file descriptor pool to 4096 and for all I know may not
have the FD problem at all any more but we've never re-enabled the
persistent connections to see.

I frankly don't know the advantages or disadvantages one way or the
other but I do know disabling them helped with FD pressure back when we
first deployed squid with limited file descriptors on the underlying OS.

I didn't think of it initially but I should also mention that our use of
this setting dates back at least to squid 2.5 and we still only run 2.7
so you probably need to see if it is still relevant to the 3.x version
you run. The default squid.conf file should tell that story and may give
a little background on what it does.

-- 
Mike Rambo
NOTE: In order to control energy costs the light at the end
of the tunnel has been shut off until further notice...
Received on Tue Jan 26 2010 - 19:36:11 MST

This archive was generated by hypermail 2.2.0 : Wed Jan 27 2010 - 12:00:05 MST