]> git.ipfire.org Git - thirdparty/squid.git/commit
Close idle client connections associated with closed idle pinned connections.
authorAlex Rousskov <rousskov@measurement-factory.com>
Thu, 22 Aug 2013 18:39:41 +0000 (12:39 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Thu, 22 Aug 2013 18:39:41 +0000 (12:39 -0600)
commit7ac4092320177be991c3ed3f116fa7eaa6dcfccb
tree54a7d8ec0df854137b8af3a3d6eee2dccc737011
parentf6c0d1ab2d27ef6cd350b3c23478f50cb85c8187
Close idle client connections associated with closed idle pinned connections.

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 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 pages in the window between those two timeouts.

Squid now 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).

It is theoretically possible that this change will break servers that send
whitespace on an idle persistent connection or perhaps send some SSL keepalive
traffic. No such cases are known to exist though.
src/FwdState.cc
src/client_side.cc
src/client_side.h