I don't think the number of seconds is significant. I tried it again now, reloading several times and each time the number of milliseconds in that SH-- line is different. I think that just indicates how long the long-polling connection was open when the reload severed it.
Here's the config: global maxconn 30000 stats socket /var/run/haproxy.stat mode 600 level admin defaults mode http timeout connect 5000ms timeout client 60000ms timeout server 60000ms backend stats_be stats uri /stats stats refresh 5s backend the_backend server the_backend1 x.x.x.x:80 frontend stats_fe bind *:8080 default_backend stats_be frontend http_proxy log 127.0.0.1 local0 log 127.0.0.1 local1 err bind *:80 mode http option forwardfor option httplog option log-separate-errors # log the name of the virtual server capture request header Host len 20 # log the amount of data uploaded during a POST capture request header Content-Length len 10 # log the beginning of the referrer capture request header Referer len 20 capture request header User-Agent len 20 # server name (useful for outgoing proxies only) capture response header Server len 20 # logging the content-length is useful with "option logasap" capture response header Content-Length len 10 default_backend the_backend Here are a few more examples of the SH-- lines: Mar 25 12:22:35 localhost haproxy-1.5v4[28922]: 96.246.63.146:63288[25/Mar/2011:12:22:34.341] http_proxy the_backend/the_backend1 6/0/0/-1/1166 502 204 - - SH-- 0/0/0/0/0 0/0 {the-proxy.etc|63|http://the-proxy|Mozilla/5.0 (Macinto} {|} "POST / HTTP/1.1" Mar 25 12:22:40 localhost haproxy-1.5v4[28922]: 96.246.63.146:63296[25/Mar/2011:12:22:36.945] http_proxy the_backend/the_backend1 6/0/0/-1/3199 502 204 - - SH-- 0/0/0/0/0 0/0 {the-proxy.etc|63|http://the-proxy|Mozilla/5.0 (Macinto} {|} "POST / HTTP/1.1" Mar 25 12:22:52 localhost haproxy-1.5v4[28922]: 96.246.63.146:63302[25/Mar/2011:12:22:41.440] http_proxy the_backend/the_backend1 6/0/0/-1/10988 502 204 - - SH-- 0/0/0/0/0 0/0 {the-proxy.etc|63| http://the-proxy|Mozilla/5.0 (Macinto} {|} "POST / HTTP/1.1" Mar 25 12:24:56 localhost haproxy-1.5v4[30407]: 96.246.63.146:63609[25/Mar/2011:12:24:49.936] http_proxy the_backend/the_backend1 6/0/0/-1/6924 502 204 - - SH-- 0/0/0/0/0 0/0 {the-proxy.etc|63|http://the-proxy|Mozilla/5.0 (Macinto} {|} "POST / HTTP/1.1" (I replaced some identifying info in those headers with "the-proxy.etc") thanks, -Cory On Thu, Mar 24, 2011 at 4:06 PM, Willy Tarreau <w...@1wt.eu> wrote: > Hi Cory, > > On Thu, Mar 24, 2011 at 01:10:49PM -0400, Cory Forsyth wrote: > > I'm not sure if this is a bug in HAProxy, or if upgrading HAProxy to 1.4 > has > > uncovered a bug in my application. > > > > I am developing a web app that uses long polling. I'm proxying its > requests > > through haproxy. I've noticed that when reload the page in the browser > > (which presumably severs the connection that the javascript is holding > open > > to the server through haproxy), I get an http status 502 error logged by > > haproxy. It looks something like this: > > > > Mar 23 12:43:45 localhost haproxy-1.5v4[5969]: > > 96.246.63.146:61899[23/Mar/2011:12:43:25.276] http_proxy > > backend1/backendserver1 6/0/0/-1/20014 > > 502 204 - - SH-- 0/0/0/0/0 0/0 > > {proxy.myserver|65|http://proxy.myserver|Mozilla/5.0 > > (Macinto} {|} "POST / HTTP/1.1" > > > > This happens in Haproxy version 1.5-dev3 and 1.5-dev4, but it does not > > happen in haproxy version 1.4.13. Is there some additional investigation > I > > can do to determine if it's a bug in 1.5x or just something that my web > app > > shouldn't have been doing anyway that is now (correctly) being logged as > an > > error by 1.5x? > > What I understand from the logs is that the server suddenly closed > after exactly 20 seconds. Maybe this is not what happened, but we > have to find why it was logged like this. Could you please post your > config ? > > Thanks, > Willy > >