Hi Malcolm,

On Fri, Oct 16, 2009 at 05:54:13PM +0100, Malcolm Turnbull wrote:
> Under the errors section what exactly does the Resp.section mean?
> Does it mean any response that is not a 200 OK?

No, it means that haproxy detected an error when waiting for the
response. It generally means a timeout (most common) or a connection
reset because the server crashed during processing (common too). On
some occasions, it can be an invalid response which is not HTTP.

> I have a customer with a lot of check errors, a lot of Resp. errors
> and too many Down errors.

Then very likely your server is overloaded and cannot sustain the
load, and even fails to respond to checks.

> Origional config was:
> 
>     server mm5 173.45.238.119:80 weight 1 cookie mm5
>     server mm6 173.45.227.82:80 weight 1 cookie mm6
> 
> I've changed it to the following for more testing and enabled logging
> at info level.
> 
>     server mm5 173.45.238.119:80 weight 1 cookie mm5 check inter 20000
> fall 3 rise 1
>     server mm6 173.45.227.82:80 weight 1 cookie mm6 check inter 20000
> fall 2 rise 1
> 
> They are getting 503 errors and I assume that means that HAProxy is
> passing traffic to the real server , getting an error then telling the
> client 503?
> or do I misunderstand that?

No, when you have a 503, it means it failed to find a server to connect
to. Either both servers are seen as down, or it repeatedly failed to
connect to either servers, until it finally gave up (retries parameter).

> Current load is between 200-400 concurrent sessions.

If this is an apache server, check that it is not limited to the default
of 256 concurrent connections max (MaxClients directive). It would
explain a lot of things, because excess connections would not even
reach apache and die in the remote system's SYN backlog first.

> Also I just realised that the
> 
> option redispatch
> 
> was not set, would this option reduce the number of 503 errors?

yes it should by redispatching the connection to the other server,
but let's face it, if both servers are saturated, having them both
trade connections between each others will not reduce the total
number of connections they each get. You could try two things :

  1) reduce the weight of one server compared to the other one,
     eg weight 10 vs weight 20, and see if the weight 10 gets a
     better life.

  2) set the maxconn value on your server lines so that you don't
     overload them. Start with "maxconn 100" and see what happens.
     Reduce until you see the problem disappear. 

Regards,
Willy
> 
> 
> 
> 
> --
> Regards,
> 
> Malcolm Turnbull.
> 
> Loadbalancer.org Ltd.
> Phone: +44 (0)870 443 8779
> http://www.loadbalancer.org/
> 

Reply via email to