Re: IIS times out on large post requests

From: Rainer Sabelka <>
Date: Fri, 11 Jul 2008 13:40:38 +0200

Hi Willy!

On Thursday 10 July 2008 19:57:09 Willy Tarreau wrote:
> On Thu, Jul 10, 2008 at 11:32:30AM +0200, Rainer Sabelka wrote:
> > But I'll install the patched version on the production system in the
> > evening - and we will see tomorrow if it solves the problem.
> fine.

I sill see some POST requests with 502 status in haproxy's logfile. So it looks like the problem is still there.

> > Is there a
> > possibility to log the actual size of the request body, so that I can
> > compare it with the content length?
> Unfortunately not, but it should not be too much complicated to add it
> (just that it would change the log format). If you're willing to try it,
> simply modify the logging function (http_sess_log I believe, from memory)
> to include the session's byte counters. You already have the byte counter
> for the response, simply add the request next to it. Keep in mind that it
> accounts for the whole request, headers included. But that will definitely
> help in your case.

Thanks for this hint.
I added now s->logs.bytes_in to the logging function (I've put it into the {}- section with the captured request headers in order to not mess up the logfile format too much).
So this is what I get now:

Jul 11 12:37:45 haproxy[15072]: [11/Jul/2008:12:35:26.355] myapp_http myapp_default/web8 1282/0/1/-1/138917 502 204 - - SHVN 6/3/3/3 0/0 {|67113|66749} "POST /AttachDocument.Asp?SID=726220&action=143&state=0&binaryattach=1&TaskID=NEW_1&TSK_ORD_OrderID=85735 HTTP/1.0" So, now it gets interesting:
The content-length is 67113 but the request size is only 66749 bytes. This means that the body of the POST request is missing some bytes and IIS is pretty correct to wait for more data (and eventually time out).

So, what does this mean? Did haproxy receive the complete request but didn't send all of it to the backend server? Or did haproxy receive an incomplete request?

Best regards,
-Rainer Received on 2008/07/11 13:40

This archive was generated by hypermail 2.2.0 : 2008/07/11 13:45 CEST