From: Amos Jeffries Date: Tue, 8 Nov 2011 10:54:37 +0000 (-0700) Subject: Document and alter the pconn idle timeout directives. X-Git-Tag: BumpSslServerFirst.take01~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=97b32442a889576ad39ece31dce4910c0a6def88;p=thirdparty%2Fsquid.git Document and alter the pconn idle timeout directives. Alters the directive names to clarify what they do and adds some more description to the config file documentation. Alters the internal config variables to match the new directive names. Also alters the well known messages in mgr:filedescriptors report a little to indicate client/server type and adds a standard "Idle " prefix for easy automated scanning. --- diff --git a/doc/release-notes/release-3.2.sgml b/doc/release-notes/release-3.2.sgml index 38e7762c41..382af3f774 100644 --- a/doc/release-notes/release-3.2.sgml +++ b/doc/release-notes/release-3.2.sgml @@ -413,6 +413,9 @@ This section gives a thorough account of those changes in three categories: destination IP to another source indicated by Host: domain DNS or cache_peer configuration. It does not affect Host: validation. + client_idle_pconn_timeout +

Renamed from persistent_request_timeout. + cpu_affinity_map

New setting for SMP support to map Squid processes onto specific CPU cores. @@ -461,6 +464,9 @@ This section gives a thorough account of those changes in three categories: logfile_daemon

Ported from 2.7. Specify the file I/O daemon helper to run for logging. + server_idle_pconn_timeout +

Renamed from pconn_timeout. + tproxy_uses_indirect_client

Controls whether the indirect client address found in the X-Forwarded-For header is used for spoofing instead of the directly connected client address. @@ -649,6 +655,12 @@ This section gives a thorough account of those changes in three categories:

The behaviour controlled by this directive is no longer possible. It has been replaced by connect_retries option which operates a little differently. + pconn_timeout +

Renamed to server_idle_pconn_timeout + + persistent_request_timeout +

Renamed to client_idle_pconn_timeout + referer_log

Replaced by the referrer format option on an access_log directive. diff --git a/src/cf.data.pre b/src/cf.data.pre index 8f3525914a..434e94b6d6 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -4658,13 +4658,13 @@ DOC_START connection establishment. DOC_END -NAME: persistent_request_timeout +NAME: client_idle_pconn_timeout persistent_request_timeout TYPE: time_t -LOC: Config.Timeout.persistent_request +LOC: Config.Timeout.clientIdlePconn DEFAULT: 2 minutes DOC_START How long to wait for the next HTTP request on a persistent - connection after the previous request completes. + client connection after the previous request completes. DOC_END NAME: client_lifetime @@ -4708,9 +4708,9 @@ DOC_START it is recommended to leave OFF. DOC_END -NAME: pconn_timeout +NAME: server_idle_pconn_timeout pconn_timeout TYPE: time_t -LOC: Config.Timeout.pconn +LOC: Config.Timeout.serverIdlePconn DEFAULT: 1 minute DOC_START Timeout for idle persistent connections to servers and other diff --git a/src/client_side.cc b/src/client_side.cc index 14918836e9..351de2c09b 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1485,14 +1485,14 @@ ConnStateData::readNextRequest() { debugs(33, 5, HERE << clientConnection << " reading next req"); - fd_note(clientConnection->fd, "Waiting for next request"); + fd_note(clientConnection->fd, "Idle client: Waiting for next request"); /** * Set the timeout BEFORE calling clientReadRequest(). */ typedef CommCbMemFunT TimeoutDialer; AsyncCall::Pointer timeoutCall = JobCallback(33, 5, TimeoutDialer, this, ConnStateData::requestTimeout); - commSetConnTimeout(clientConnection, Config.Timeout.persistent_request, timeoutCall); + commSetConnTimeout(clientConnection, Config.Timeout.clientIdlePconn, timeoutCall); readSomeData(); /** Please don't do anything with the FD past here! */ diff --git a/src/pconn.cc b/src/pconn.cc index 48b5e4d52a..4f75424b6e 100644 --- a/src/pconn.cc +++ b/src/pconn.cc @@ -192,7 +192,7 @@ IdleConnList::push(const Comm::ConnectionPointer &conn) comm_read(conn, fakeReadBuf_, sizeof(fakeReadBuf_), readCall); AsyncCall::Pointer timeoutCall = commCbCall(5,4, "IdleConnList::Timeout", CommTimeoutCbPtrFun(IdleConnList::Timeout, this)); - commSetConnTimeout(conn, Config.Timeout.pconn, timeoutCall); + commSetConnTimeout(conn, Config.Timeout.serverIdlePconn, timeoutCall); } /// Determine whether an entry in the idle list is available for use. @@ -417,7 +417,7 @@ PconnPool::push(const Comm::ConnectionPointer &conn, const char *domain) assert(!comm_has_incomplete_write(conn->fd)); LOCAL_ARRAY(char, desc, FD_DESC_SZ); - snprintf(desc, FD_DESC_SZ, "Idle: %s", aKey); + snprintf(desc, FD_DESC_SZ, "Idle server: %s", aKey); fd_note(conn->fd, desc); debugs(48, 3, HERE << "pushed " << conn << " for " << aKey); } diff --git a/src/structs.h b/src/structs.h index 4cce1004ab..84952a2ebc 100644 --- a/src/structs.h +++ b/src/structs.h @@ -207,8 +207,8 @@ struct SquidConfig { time_t forward; time_t peer_connect; time_t request; - time_t persistent_request; - time_t pconn; + time_t clientIdlePconn; + time_t serverIdlePconn; time_t siteSelect; time_t deadPeer; int icp_query; /* msec */