#
-# $Id: cf.data.pre,v 1.358 2004/10/08 17:42:09 hno Exp $
+# $Id: cf.data.pre,v 1.359 2004/10/10 02:49:04 hno Exp $
#
#
# SQUID Web Proxy Cache http://www.squid-cache.org/
-----------------------------------------------------------------------------
COMMENT_END
+NAME: forward_timeout
+COMMENT: time-units
+TYPE: time_t
+LOC: Config.Timeout.forward
+DEFAULT: 4 minutes
+DOC_START
+ This parameter specifies how long Squid should at most attempt in
+ finding a forwarding path for the request before giving up.
+DOC_END
+
NAME: connect_timeout
COMMENT: time-units
TYPE: time_t
LOC: Config.Timeout.connect
-DEFAULT: 2 minutes
+DEFAULT: 1 minute
DOC_START
- Some systems (notably Linux) can not be relied upon to properly
- time out connect(2) requests. Therefore the Squid process
- enforces its own timeout on server connections. This parameter
- specifies how long to wait for the connect to complete. The
- default is two minutes (120 seconds).
+ This parameter specifies how long to wait for the TCP connect to
+ the requested server or peer to complete before Squid should
+ attempt to find another path where to forward the request.
DOC_END
NAME: peer_connect_timeout
/*
- * $Id: forward.cc,v 1.119 2004/09/25 15:52:59 hno Exp $
+ * $Id: forward.cc,v 1.120 2004/10/10 02:49:05 hno Exp $
*
* DEBUG: section 17 Request Forwarding
* AUTHOR: Duane Wessels
if (fwdState->origin_tries > 2)
return 0;
- if (squid_curtime - fwdState->start > Config.Timeout.connect)
+ if (squid_curtime - fwdState->start > Config.Timeout.forward)
return 0;
if (fwdState->flags.dont_retry)
const char *host;
unsigned short port;
const char *domain = NULL;
- time_t ctimeout;
+ int ctimeout;
+ int ftimeout = Config.Timeout.forward - (squid_curtime - fwdState->start);
struct in_addr outgoing;
unsigned short tos;
ctimeout = Config.Timeout.connect;
}
+ if (ftimeout < 0)
+ ftimeout = 5;
+
+ if (ftimeout < ctimeout)
+ ctimeout = ftimeout;
+
if ((fd = pconnPop(host, port, domain)) >= 0) {
if (fwdCheckRetriable(fwdState)) {
debug(17, 3) ("fwdConnectStart: reusing pconn FD %d\n", fd);
/*
- * $Id: structs.h,v 1.490 2004/09/25 15:46:45 hno Exp $
+ * $Id: structs.h,v 1.491 2004/10/10 02:49:05 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
time_t read;
time_t lifetime;
time_t connect;
+ time_t forward;
time_t peer_connect;
time_t request;
time_t persistent_request;