Hi Willy, Thank you for the explanations. In fact I had assumed that CD/cD was something related to timing out and connection closing, and so I increased contimeout from 5000 (5ms) to 50000 (5s) (BTW, I think that was a typo in my config). This has solved my problem.
Although, looking at the timers from those three lines, nothing is below 5 seconds (60000, 50003, 57935). Maybe I missed the specific lines in the log. Anyway, it works now. Cheers. -----Original Message----- From: Willy Tarreau Sent: Monday 14, February 02, 2011 12:41 Subject: Re: HAproxy and instant messagers (Ym) 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 The information contained herein is intended for its addressee(s) only and it is privileged or otherwise confidential. Any unauthorized distribution, amendment or disclosure hereof is strictly forbidden by the law. Please find complete and translated versions at http://www.rompetrol.com/disclaimer.html