Thanks Willy,
  The information that you gave me was very helpful. I checked your
suggestions and you are right.  I made the client upload files from
another place and it seems to work quite nicely. So I guess I have to
figure out if my internet provider is making the caching/proxy, or my
hosting provider is doing this.

Cheers for the great product that you've made and the helpful mailing list.

Regards,
 Galfy

On Tue, Jun 21, 2011 at 10:29 PM, Willy Tarreau <w...@1wt.eu> wrote:
> On Tue, Jun 21, 2011 at 04:23:52PM +0200, Galfy Pundee wrote:
>> Hi all,
>>   At the moment I am evaluating haproxy as a reverse proxy. Everything
>> seems to work great except one thing and I do not know where is the
>> problem. The situations in which I get the problem is the following:
>> 1. client uploads big file to the haproxy
>> 2. all incoming data seems to be sent from the client but the backend
>> is taking quite some time to save the data to the hard disk.
>> 3. meanwhile the client reports time out
>> 4. There is nothing sent from the client to the server, but the
>> backend seems to continue to write the file until it writes down all
>> the bytes.
>>
>> As a result all uploads of big files are reported from the client as
>> failed, even though they are stored with a delay. How can I make the
>> client aware about this fact? Why is this happening? Can it be that
>> the haproxy is getting the data very fast, but the backend cannot
>> store it so fast? Any suggestions or similar experiences?
>
> This cannot be the case because haproxy's buffers are relatively small
> size (16 kB by default), so it cannot hold all of the request. However
> what you describe is common when there is a client-side anti-virus which
> parses POST requests. What happens is exactly what you're describing,
> the client sends everything very fast to the local gateway, and waits
> for a long time while the data are uploaded over a slow link, then
> finally times out.
>
> Do you know if there is any such thing on the client side ? Alternatively
> it is possible that socket buffers on the client are far too large and are
> able to hold the whole request at once without the client application being
> aware of this. This is less common because what you describe suggests that
> the amount of data is huge, but still this is a possible scenario that I've
> observed with a USB 3G key with huge buffers.
>
> Ideally you should put a tcpdump on the client side and in front of haproxy
> to see what's happening. But if you're facing a proxy which buffers
> everything before passing on the request, I see no easy solution to the
> problem.
>
> Regards,
> Willy
>
>

Reply via email to