[squid-users] Getting lot of client lifetime timeout and subsequently running out of file descriptors
Amos Jeffries
squid3 at treenet.co.nz
Mon Aug 19 01:57:39 UTC 2019
On 2019-08-19 07:14, Chirayu Patel wrote:
> Hi,
>
> I am running squid version 4.6 and have set the file descriptors limit
> to 5000
>
> I get an average of 1 lakh hits daily and in a day or 2 , I start
> getting these messages :
>
> Sun Aug 18 15:00:29 2019 daemon.notice squid[4906]: WARNING: Closing
> client connection due to lifetime timeout
...
>
> 1. Should i decrease the client_lifetime ? Or should i increase the
> File Descriptor limit ? or adjust the timeouts
>
I would be looking into why these clients are having such long
connection times that they hit the 1 day lifetime limit.
If they do not actually need connections open for that whole time, then
lowering the client_lifetime is safe enough. You will still get these
log entries, no avoiding that since the clients are holding onto
connections.
You may be able to raise the FD limits as well. On a limited devices I
would pair that with lowering the read_ahead_gap to 8 KB.
> 2. Also, there is a steady increase of memory on the device.. Squid is
> currently installed on an Access Point which is a resource
> constrained device.. Is there any way to control it..
>
Steadily increasing number of very log-lived client connections is
likely th esource of that, each will be using up to 256KB of I/O
buffers. Preventing too many connections in parallel is the best thing
for that, so you are on the right track trying to remove/reduce these
ones hitting the lifetime.
Amos
More information about the squid-users
mailing list