From db43f1799a5e8a8cd048f8f6e9c4d0c894caa8bb Mon Sep 17 00:00:00 2001 From: Alex Rousskov Date: Sun, 8 Nov 2020 17:50:03 +0000 Subject: [PATCH] Squid-to-client write_timeout triggers client_lifetime timeout (#747) Since commit 5ef5e5c, a socket write timeout triggers two things: * reporting of a write error to the socket writer (as designed/expected) * reporting of a socket read timeout to the socket reader (unexpected). The exact outcome probably depends on the transaction state, but one known manifestation of this bug is the following level-1 message in cache.log, combined with an access.log record showing a much-shorter-than-client_lifetime transaction response time. WARNING: Closing client connection due to lifetime timeout --- src/comm.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/comm.cc b/src/comm.cc index b0404d127f..e49268ddae 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -1607,6 +1607,7 @@ checkTimeouts(void) Comm::SetSelect(fd, COMM_SELECT_WRITE, NULL, NULL, 0); COMMIO_FD_WRITECB(fd)->finish(Comm::COMM_ERROR, ETIMEDOUT); CodeContext::Reset(); + continue; #if USE_DELAY_POOLS } else if (F->writeQuotaHandler != nullptr && COMMIO_FD_WRITECB(fd)->conn != nullptr) { // TODO: Move and extract quota() call to place it inside F->codeContext. -- 2.47.2