Re: Problems Reloading

From: Willy Tarreau <>
Date: Wed, 14 Jan 2009 06:32:08 +0100

On Tue, Jan 13, 2009 at 07:33:03PM -0600, Jerod Santo wrote:
> I am just getting started with haproxy and want to use it to do
> content-switching. I'm having a little trouble reloading configuration
> changes with my current config because when I execute the following command:
> haproxy -f /etc/haproxy/haproxy.conf -p $(</var/run/
> -st $(</var/run/

There is something wrong above, your pid file is wrong :

   -p $(</var/run/

will become "-p 12345" for instance if last pid was 12345. If you did this twice, you have not updated /var/run/ which then contains an old pid, so the new process will not be able to send the signal to the old one.

You need to proceed like this :

# haproxy -f /etc/haproxy/haproxy.conf -p /var/run/ -st $(</var/run/

But this will work only once the correct pid is in this file. In the mean time, you can also use that (assuming you only have one haproxy on your machine) :

# haproxy -f /etc/haproxy/haproxy.conf -p /var/run/ -st $(pidof haproxy)

Willy Received on 2009/01/14 06:32

This archive was generated by hypermail 2.2.0 : 2009/01/14 06:45 CET