Re: timeout client / server clarification

From: Willy Tarreau <w#1wt.eu>
Date: Thu, 20 Aug 2009 19:36:39 +0200


On Thu, Aug 20, 2009 at 06:30:10PM +0100, Pedro Mata-Mouros Fonseca wrote:
> Greetings Willy, everyone,
>
> Had version 1.3.19, compiled from sources, and just upgraded to
> 1.3.20. The backend server that's being used for the upload is an
> Apache + mod_php. I've done the following in haproxy's configuration:
> set timeout client to 1s and timeout server to 8s. Started an image
> upload and after what seemed like 8 secs: "504 Gateway Time-out, The
> server didn't respond in time". I can see that the Apache PHP process
> keeps running and processes the upload, about one or two seconds after.
>
> Taking into account your explanation of HAProxy's behavior, this is
> probably some misconfiguration on my side, either Apache or PHP, but I
> can't really see what could be the problem. It looks like Apache is
> not showing any activity until all the file has been sent by the
> client, which is strange because Apache should generate activity and
> the timeout server timer should be reset throughout the upload...

It is possible that at one moment apache stops reading data for whatever reason. For instance it may be deciding that the uploaded file is too big and needs to be stored on disk, it may even be blocked because of lack of disk space. These are just ideas, to help you troubleshoot, not necessarily likely causes.

> Can anyone shed some light on this?

Could you please check the logs and see if you observe flags "cD" or flags "sD" in the termination flags for failed requests ? Also, could you please send me your config ?

Wlily Received on 2009/08/20 19:36

This archive was generated by hypermail 2.2.0 : 2009/08/20 19:45 CEST