[squid-dev] [PATCH] pconn_lifetime robustness fixes

Alex Rousskov rousskov at measurement-factory.com
Fri May 1 16:29:19 UTC 2015

On 04/28/2015 08:18 AM, Amos Jeffries wrote:
> It is worth noting that this patch means the directive is now no longer
> guaranteed to meet its primary use case:

Yes, but only if one misinterprets the primary use case. AFAICT after
rereading the original pconn_lifetime thread, this misinterpretation has
started from the very beginning and, apparently, has not quite ended
yet. The feature limits the total lifetime of a connection, but it is
applied to idle persistent connections only.

> With the reversion to the keep-alive -> close action any existing and
> ongoing pipeline of requests will cause the connection to persist past
> its lifetime indefinitely. 

Yes, the limit should affect idle persistent connections only. We tried
to expand the definition of "idle" and "persistent" to cover more use
cases (in part, to accommodate squid-dev review comments IIRC), but the
real world was against us. For example, terminating connections between
pipelined requests caused interoperability problems even though they are
not supposed to happen with compliant HTTP clients. I suspect HTTP/2
solves this problem, but we are not there yet.

I would not be surprised to see more fixes in this direction. For
example, we have an untriaged bug report about FTP control connections
being negatively affected, with an argument that FTP does not have a
concept of "idle" and so should not be the subject to pconn_lifetime limits.



>> On 04/27/2015 06:40 PM, Tsantilas Christos wrote:
>>> If there is not any objection I will apply this patch to trunk.
>>> On 04/15/2015 07:11 PM, Tsantilas Christos wrote:
>>>> Hi all,
>>>>   I am attaching which fixes pconn_lifetime feature.
>>>> We had a long discussion for this feature, which is resulted to the
>>>> patch r13780, but unfortunately, Measurement Factory customers reported
>>>> problems:
>>>> 1. Squid closed connections with partially received requests when they
>>>> reached pconn_lifetime limit. We should only close _idle_ connections.
>>>> 2. When connecting to Squid without sending anything for longer than
>>>> pconn_lifetime, the connection hangs if the request is sent after the
>>>> waiting period.
>>>> 3. The connection also hangs if the initial request is starting to be
>>>> transmitted but then there is a longer pause before the request is
>>>> completed.
>>>> Please read the patch preamble for more informations.
>>>> This is a Measurement Factory project.
> Amos
> _______________________________________________
> squid-dev mailing list
> squid-dev at lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-dev

More information about the squid-dev mailing list