Search squid archive

Re: Squid intermittently fails with 503 after connect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 19/09/2013 1:29 a.m., John McGowan wrote:
On Wed, Sep 18, 2013 at 7:41 AM, Alfredo Rezinovsky
<alfredo@xxxxxxxxxxxxxxxx> wrote:
El 16/09/13 18:35, John McGowan escribió:
squid defaults connect_retries to 0
try setting it to something and see if the 503 errors frequency are lower
with this.

I remember looking at that configuration parameter, but there were two
things that stopped me from working with it.

1) I believe it's only available in squid 3, and I'm using squid 2.X
(what's available via yum from CentOS 5.X)

2) This line from the documentation...

This sets the maximum number of connection attempts made for each
TCP connection. The connect_retries attempts must all still
complete within the connection timeout period.

I may be reading this wrong, but in my situation, if I had a low
timeout, it seems like it wouldn't do any good to increase
connect_retries, since the first connect attempt is likely to use up
the complete timeout period available.

Correct. That timout covering the whole TCP setup process from DNS reolution through to multiple retries is one of the design flaws of 2.x and early 3.x. This has now been fixed in 3.2+ where that timeout only covers a single TCP connection attempt (forward_timeout still covers the whole process, with configurable retries and separate dns_timeout).

The operation and timeout nesting looks something like this:
in 2.x:
 forward_timeout = forward_retries * connect_timeout
  connect_timeout = connect_retries * (dns_timeout + m * TCP connects)

in 3.2+:
forward_timeout = peer selection + dns_timeout + forward_max_retries * (connect_retries * connect_timeout).

Amos




[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux