[squid-dev] [PATCH] pconn_lifetime

Alex Rousskov rousskov at measurement-factory.com
Fri Oct 3 14:52:42 UTC 2014

On 10/01/2014 11:24 PM, Amos Jeffries wrote:

> We already have client_lifetime directive which is documented as
> doing exactly what this new directive does. 
> (<http://www.squid-cache.org/Doc/config/client_lifetime/>).

No, client_lifetime is not documented (and is not meant) to do what we
want pconn_lifetime to do. Client_lifetime is supposed to kill client
connections exceeding the configured lifetime, _regardless_ of the
client (and client connection) state. We do not want that for
pconn_lifetime which only affects _idle_ connections.

Moreover, pconn_lifetime is meant to apply to all connections, not
just the connections from a client.

> * change your new directive "pconn_lifetime" to be 
> "client_pconn_lifetime" since it is specifically scoped to client 
> browser connections.

pconn_lifetime is not exclusive to client browser connections.
Ideally, it should apply to _all_ Squid connections that are in an
"idle persistent connection" state. We are not there yet, but we
already support origin connections AFAIK.

> * update tunnel.cc client connection timeouts to use
> conn->timeLeft(). - maybe with some new tunnel-specific lifetime
> config item. But I think your new config lifetime is appropriate
> for now at least.

There is no concept of "idle persistent connection" for TCP tunnels so
we should not apply pconn_lifetime to them right now.

Hope this clarifies,


More information about the squid-dev mailing list