Mike Rambo wrote:
Landy Landy wrote:
--- On Tue, 1/26/10, Mike Rambo <mrambo@xxxxxxxxxxxxx> wrote:
From: Mike Rambo <mrambo@xxxxxxxxxxxxx>
Subject: Re: running out of filedescriptors
To: "Landy Landy" <landysaccount@xxxxxxxxx>
Cc: "Squid-Users" <squid-users@xxxxxxxxxxxxxxx>
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.
IIRC 2.x had a few minor issues around releasing or holding persistent
connections. 3.x handles them better according to RFC. But whether that
balances more to pro or con I'm not certain.
Pro:
greatly reduces the number of FD used and TCP handshake delays when
talking to a client or server.
Cons:
greatly increases the number of server FD left open after contact is
done and before a close timeout has happened on the server.
Amos
--
Please be using
Current Stable Squid 2.7.STABLE7 or 3.0.STABLE21
Current Beta Squid 3.1.0.15