This is what I use to reload:

haproxy -D -f /etc/lb-transparent-slave.cfg -sf $(pidof haproxy)

(Which has pidof lookup process id instead of file it in a file, but that
shouldn't matter.)
The main problem is you are (-st) terminating (aborting) existing
connections instead of (-sf) finishing them.



> -----Original Message-----
> From: Adrian Moisey [mailto:[email protected]]
> Sent: Thursday, May 14, 2009 4:33 AM
> To: [email protected]
> Subject: reloading haproxy
> 
> Hi
> 
> I am currently testing HAProxy for deployment in our live environment.
> I have HAProxy setup to load balance between 4 web servers and I'm
> using
> ab (apache bench) for testing throughput.
> 
> I am trying to get the haproxy reloading working, but it doesn't seem
> to
> work.
> 
> I start up a few ab's and then run:
> /usr/sbin/haproxy -f /etc/haproxy.cfg -D -p /var/run/haproxy.pid -st
> `cat /var/run/haproxy.pid`
> 
> I see the new haproxy take over the old one, but my apache bench fails
> with the following error message:
> apr_socket_recv: Connection reset by peer (104)
> 
> 
> I thought that the new haproxy would take over the old one without any
> issues, but that doesn't seem to be the case.
> 
> Does anyone know how do reload haproxy without affecting the client?
> --
> Adrian Moisey
> Acting Systems Designer | CareerJunction | Better jobs. More often.
> Web: www.careerjunction.co.za | Email: [email protected]
> Phone: +27 21 818 8621 | Mobile: +27 82 858 7830 | Fax: +27 21 818 8855
> 
> Internal Virus Database is out of date.
> Checked by AVG - www.avg.com
> Version: 8.5.320 / Virus Database: 270.12.10/2088 - Release Date:
> 05/05/09 13:07:00


Reply via email to