Hi Wei, Which version of HAProxy are you running? In recent 1.5 branch, there were bugs leading to 502 errors on POST. You might be in that case.
cheers On Thu, Jan 24, 2013 at 7:03 AM, Wei Kong <[email protected]> wrote: > I tested using a script that simply calls a curl to access a url in a > loop. If I have two servers in the backend, the script will hang after a > while. But if I only have one server in the backend, the script will be > able to continue. > > We are using the most basic haproxy setting, why is it having issues when > there are more than one server configured in the backend? > > On 1/23/13 11:00 AM, "Wei Kong" <[email protected]> wrote: > >>Hi, >> >>I found out that if I take out one server from node_admin backend, it >>works much better. Can someone please help shed some lights on this issue? >>Is it related to some session/cache issue? >> >>Wei >> >>On 1/23/13 10:34 AM, "Wei Kong" <[email protected]> wrote: >> >>>We are getting a lot of 502 errors from haproxy on a server that is not >>>too busy >>> >>>The logged message shows >>> >>>Jan 23 18:31:01 preview2-stratus-admin-1 haproxy[28352]: >>>50.196.128.9:54443 [23/Jan/2013:18:29:01.649] node_frontend >>>node_admin/server1 6/0/2/-1/+120043 502 +204 - - SH-- 2/2/0/0/0 0/0 "POST >>>/log/pixgrid/NOSERVERID/2013-01-23T18:07:08.066Z/NODATETME/1/100 >>>HTTP/1.1" >>> >>>What does SH mean here? >>> >>>Our haproxy config: >>> >>>global >>> daemon >>> maxconn 10000 >>> stats socket /var/run/haproxy.stat mode 666 level admin >>> >>>defaults >>> mode http >>> retries 3 >>> timeout connect 6000ms >>> timeout http-request 60000ms >>> timeout client 600000ms >>> timeout server 600000ms >>> option httplog >>> option logasap >>> log global >>> log 127.0.0.1 local0 >>> log 127.0.0.1 local1 notice >>> option httpclose >>> no option checkcache >>> >>> >>>frontend node_frontend >>> bind *:7000 >>> bind *:80 >>> acl is_admin hdr_beg(host) -i <adminhost> >>>use_backend node_admin if is_admin >>>default_backend default >>> >>>backend default >>> mode http >>> server server0 127.0.0.1:7002 maxconn 10 >>> >>>backend node_admin >>> mode http >>> server server0 127.0.0.1:7001 maxconn 150 >>> server server1 10.171.99.144:7001 maxconn 200 >> > > >

