RE: performance testing and 503 errors

From: Martin Pegman <mpegman#mtld.mobi>
Date: Fri, 29 Aug 2008 17:49:37 +0100


This upgrade made all of this issues described disappear.!  

Thank you for your help.  

Regards

Martin P  

From: Caleb Anthony [mailto:caleb.anthony#gmail.com] Sent: 29 August 2008 14:40
To: Martin Pegman
Cc: haproxy#formilux.org
Subject: Re: performance testing and 503 errors  

HAProxy is probably marking your servers as down when they fail the HTTP protocol checks.  

In your config you specified option httpchk. According to the documentation, by specifying that, each server will receive an OPTIONS request on the URL "/" and only 2xx or 3xx HTTP response codes will be considered successful. I'm sure that's where the breakdown is. Is it possible that your Apache servers are denying OPTIONS requests, or something similar?  

Also, try and comment out the option httpchk line and see if HAProxy stops marking your servers as down.  

On 8/29/08, Martin Pegman <mpegman#mtld.mobi> wrote:

Hi,
I am having what I'm sure is a configuration issue with my first installation of haproxy and I would appreciate any pointers you may be able to give me.

I originally had 2 apache2 servers running a php application behind a basic proxy that needs to access other internet sites for some content so the sessions are quite long. I have used JMeter to get a throughput of 3 responses a sec and can handle 100+ concurrent connections.

I have replaced this with a haproxy server in front of 5 apache servers (all different hosts) using the config below.

However now when I run the same JMeter tests I almost immediately receive error 503 there is no server to handle your request errors.! And by immediately I mean before 100 urls have been tested.

The apache servers never even appear to show any load so I cannot see why ha proxy would assume they cannot handle more connections.

I'm running on Ubuntu 8.04 kernel 2.6.21.7-2 with HA-Proxy version 1.3.12 2007/06/17.

I have read the available documentation and I cannot see how to resolve the issue. Any pointers or assistance would be greatly appreciated.

Regards
Martin P

global          #log 127.0.0.1 <http://127.0.0.1/>    local0
       log 127.0.0.1 <http://127.0.0.1/>    local0 debug
       log 127.0.0.1 <http://127.0.0.1/>    local1 debug

#log localhost local0 debug
maxconn 50096
#debug
#quiet
user haproxy group haproxy daemon nbproc 1 defaults mode http clitimeout 150000 # maximum inactivity time on the client side srvtimeout 500000 # maximum inactivity time on the server side contimeout 500000 # maximum time to wait for a connection attempt to a server to succeed option httpclose # disable keepalive (HAProxy does not yet support the HTTP keep-alive mode) option abortonclose # enable early dropping of aborted requests from pending queue option httpchk # enable HTTP protocol to check on servers health option forwardfor # enable insert of X-Forwarded-For headers option clitcpka
#stats
stats enable # enable web-stats at /haproxy?stats stats auth admin:pass # force HTTP Auth to view stats

##Instant mobiliser
listen im_a_proxy 0.0.0.0:80 <http://0.0.0.0/>

       balance roundrobin
       option httplog
       option dontlognull
       option abortonclose
       log 127.0.0.1 <http://127.0.0.1/>    local0 debug
       server im1      ip-10-250-9-238.ec2.internal weight 1 check
       server im2      ip-10-250-9-219.ec2.internal weight 1 check
       server im3      ip-10-251-69-220.ec2.internal weight 1 check    

         server im4      ip-10-250-8-44.ec2.internal weight 1 check
         server im5      ip-10-251-69-188.ec2.internal weight 1 check
       

 
Received on 2008/08/29 18:49

This archive was generated by hypermail 2.2.0 : 2008/08/29 19:00 CEST