[PATCH] Close idle client connections associated with closed idle pinned connections

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Fri, 16 Aug 2013 18:45:28 -0600

Hello,

    Squid was not monitoring idle persistent connections pinned to
servers. Squid would discover that the pinned server connection is
closed only after receiving a new request on the idle client connection
and trying to write that request to the server. In such cases, Squid
propagates the pinned connection closure to the client (as it should).

Chrome and, to a lesser extent, Firefox handle such races by opening a
new connection to Squid and resending the failed [idempotent] request
transparently to the user. However, IE usually displays an error page to
the user.

While some pconn races cannot be avoided, without monitoring idle
pconns, Squid virtually guaranteed such a race in environments where
origin server idle connection timeout is smaller than client/Squid
timeouts and users are revisiting server pages in the window between
those two timeouts.

With this patch, Squid monitors idle pinned connections similar to idle
connections in the pconn pool and closes the corresponding idle client
connection to keep the two sides in sync (to the extent possible).

The attached patches are for a v3.3-based branch and trunk.

HTH,

Alex.

Received on Sat Aug 17 2013 - 00:45:36 MDT

This archive was generated by hypermail 2.2.0 : Tue Aug 20 2013 - 12:00:12 MDT