Re: timeout client / server clarification

From: Willy Tarreau <>
Date: Fri, 21 Aug 2009 14:18:15 +0200

Hello Pedro,

On Fri, Aug 21, 2009 at 11:05:04AM +0100, Pedro Mata-Mouros Fonseca wrote:
> Hello Willy, everyone,
> This is the only entry in /var/log/haproxy.log generated after the
> upload and the 504 Gateway Time-out. It has a "sH" flag:
> Aug 20 18:09:42 localhost haproxy[9778]: [20/Aug/
> 2009:18:09:40.477] vip app/vm-1 1/0/1/-1/+2132 504 +194 - - sH--
> 0/0/0/0/0 0/0 "POST /manage/upload.html HTTP/1.1"

OK, this simply means that you have too short timeouts. The server took more than two seconds to respond and a timeout expired. I see that you have "timeout client 1s" (extremely short) and "option abortonclose", so I suspect that what's happening is that the client-side connection expires so the request is aborted before the server responds. In fact, you should never have any timeout below 3s, which is the time for a TCP retransmit, in order to cover packet losses. And I normally recommend to set the same timeout on the client and server sides, for easier debugging possibilities.

Willy Received on 2009/08/21 14:18

This archive was generated by hypermail 2.2.0 : 2009/08/21 14:30 CEST