Hi Alex,

On Tue, Sep 13, 2011 at 03:18:54PM +0100, Alex Davies wrote:
> Hi,
> 
> Thank you for your observation - indeed I did notice some of those as I was
> writing my email - I have updated my globals to increase the server timeout
> (as we are doing long polling) and reduce the others, and remove the
> duplicates:
> 
> defaults
>     mode              http
>     option            httplog
>     #option           tcplog
>     option            dontlognull
>     option            dontlog-normal
> 
>     log               global
>     retries           10
>     maxconn           50000
>     option forwardfor except 127.0.0.1/32 # Apache on https://127.0.0.1
>      option httpclose                      # Required for REMOTE HEADER
>     option redispatch
> 
>     timeout connect 10000
>     timeout client  10000
>     timeout server  7200000
> 
> I still notice the same errors in the logs! (slightly less 504, as I would
> expect through the increase in "timeout server" - but I still don't
> understand why I get any at all in the first minute of a new process).

To complete Cyril's detailed analysis, I'd like to add that you'll only
see 502s when you restart, and it will take some time before you see 504s
again (eg: 2 hours with the config above).

The 502s mean that the server has suddenly aborted the connection (flags SH),
while the 504s indicate that haproxy was fed up with waiting and closed after
"timeout server" was elapsed.

So yes it's very possible that your server has its own timeout, but it should
be in the 30s from what I saw in your logs. It sill does not explain why some
requests never time out on the server, maybe they don't wake the same components
up ?

Regards,
Willy


Reply via email to