Hi,

On Mon, Feb 14, 2011 at 10:35:15AM +0200, Florescu, Dan Alexandru wrote:
> Anyone willing to help?

It's possible that people are not much skilled in this application :-/

> Also, if I can get some help interpreting the following lines extracted from 
> haproxy.log:

It's a good point you got the logs. Here are the explanations :

> balance roundrobin/ proxy 0/0/1/26004/60000 200 2054 - - CD-- 
> 470/470/456/456/0 0/0 "POST http://98.139.60.242/ HTTP/1.1"
> balance roundrobin/ proxy 0/0/1/-1/50003 504 194 - - sH-- 490/490/489/489/0 
> 0/0 "POST http://98.139.60.242/ HTTP/1.1"
> balance roundrobin/ proxy 0/0/0/2/57935 407 47897 - - cD-- 531/531/528/528/0 
> 0/0 "GET http://i1.ytimg.com/i/ HTTP/1.1"
> specifically, what do those flags mean? e.g. CD, sH, cD

CD means the Client closed the connection during the Data phase. I don't
know how Ym works but it's possible that both sides exchange small chunks,
and the client has actively stopped doing so (eg: click Stop, close the
browser window, ...).

sH means the server has failed to respond to a request within the configured
timeout. In your case, the server did not say anything within 50 seconds.
Since you're connecting through Squid, I suspect that in fact squid failed
to establish a connection to the server (server may be overloaded) and that
haproxy timed out first. You can increase your haproxy timeouts if you want,
so that you get the Squid's error in the response.

cD means the client timed out during the data phase. Most likely there were
data to read in the buffer but the client did not care to read them, and
haproxy timed out after 58 seconds.

Since haproxy is between a browser and a squid, it needs to be configured to
look for the Proxy-Connection header instead of the Connection header. I think
it is what is causing these issues, because the client and squid can't agree
on what scheme to use (close/keep-alive). You have to enable
"option http-use-proxy-header" for that. Also, you'd better use "option
http-server-close" than "httpclose", as it will maintain the connection alive
on the client side.

Regards,
Willy


Reply via email to