[squid-users] Response timeout for upstream HTTP servers

Amos Jeffries squid3 at treenet.co.nz
Wed Jun 8 06:13:53 UTC 2016

On 8/06/2016 5:08 a.m., Adam Vollrath wrote:
> Good morning! I'm having trouble with upstream HTTP servers not
> responding for more than 30 seconds.  I'd like to just return an empty
> response to the downstream client. Nothing is better than waiting.
> I'm looking for a `squid3` configuration directive to timeout between an
> HTTP request and response.  Here's the directive for `nginx`:
> http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_read_timeout
> 	"Defines a timeout for reading a response from the proxied server. The
> timeout is set only between two successive read operations, not for the
> transmission of the whole response. If the proxied server does not
> transmit anything within this time, the connection is closed."
> Does `squid3` have a way to implement this?  Is this what the
> `read_timeout` directive does if my upstream systems are configured as
> `cache_peer`?

I think you misunderstand what "proxy" means. Nginx primary design focus
as a web server like Apache. So proxied traffic is a special activity
for it.

Squid is a proxy. So by definition everything going through Squid is

<http://www.squid-cache.org/Doc/config/read_timeout/> controls the
timeout for individual read(2) operations on a connection which is active.

<http://www.squid-cache.org/Doc/config/write_timeout/> controls the
timeout for individual write(2) operations on a connection which is active.

controls the timeout for connections in idle state between requests.

Other timeouts control specific actions like DNS, route selection,
connect(2), or client connection activities.


More information about the squid-users mailing list