Hello Dnia 2010-02-19, pią o godzinie 17:40 +0100, Dawid Sieradzki / Gadu-Gadu S.A. pisze:
> Hi, > > Today i had strange problem with haproxy (old version: 1.3.15.2 2008/06/21 ) > > The situation: > > Haproxy:80 --------http_roundrobin----> backend-[1-4].atm:80 > > at 13:00 backend-2.atm is down for 6 sec. > haproxy switched off backend-2 for 6 sec, couting the downtime in stats. > After 6 sec. backend-2 is up. > Haproxy switch on backend-2 > > But not correct. > From this time by three hours haproxy sending only ~ 1% /sec packets to > backend-2, and the rest to other backends [1,3,4]. > > I was checked connection to backend manualy, everything work's! > On stats haproxy shows backend-2 as enabled. > > At 16:00 i did /etc/init.d/haproxy restart > And everything come back to work normaly.. backend-2 get 25% traffic. > > > My God! It was strange! > > > Look for configuration and the JPG. > > > > -----/ cut here /---- > > defaults > log global > mode http > option httplog > option dontlognull > retries 3 > option redispatch > > maxconn 2000 > timeout connect 500000 > timeout client 20000 > timeout server 500000 > > > frontend internal_80 > > bind XXXXXXXX:80 > > log global > mode http > no option forceclose > no option httpclose > option httplog > option dontlognull > maxconn 2000 > option forwardfor > > > backend backendA > > mode http > log global > > option redispatch > option httplog > option httpclose > option http_proxy > option forwardfor > option forwardfor except 127.0.0.1 > > retries 3 > > balance roundrobin > > server b-1 backend-1.atm:80 weight 1 maxconn 4096 check > server b-2 backend-2.atm:80 weight 1 maxconn 4096 check > server b-3 backend-3.atm:80 weight 1 maxconn 4096 check > server b-4 backend-4.atm:80 weight 1 maxconn 4096 check > > ---- / cut here /---- > > First, upgrade to newest 1.3.x, it fixes a lot of bugs: http://haproxy.1wt.eu/knownbugs-1.3.html From page: "Let's put it short : those of you running 1.3.15.2, 1.3.16 or 1.3.17 are doomed. Those running 1.3.15.X before 1.3.15.7, 1.3.19 or 1.3.21 are at risk. 1.3.14.14, 1.3.15.10 and 1.3.20 are pretty good, and 1.3.22 is the only one with no known bug yet.", then if it didn't fixed it for you post again :) Timeout of 500s is huge, remember its "inactivity" not whole connection so connections longer than timeout will still be alive if there is traffic on them. Also, u ahve per-backend maxconn on 4096 but u have frontend and default maxconn of 2000 so overall u have 2000 conn limit on frontent U need to specify "option forwardfor except 127.0.0.1" only once, in frontent. and why u use "option http_proxy" ? From docs: "It sometimes happens that people need a pure HTTP proxy which understands basic proxy requests without caching nor any fancy feature. In this case, it may be worth setting up an HAProxy instance with the "option http_proxy" set. In this mode, no server is declared, and the connection is forwarded to the IP address and port found in the URL after the "http://" scheme." -- Mariusz Gronczewski (XANi) <xani...@gmail.com> GnuPG: 0xEA8ACE64 http://devrandom.pl
signature.asc
Description: To jest część wiadomości podpisana cyfrowo