Reloading with expose-fd and multiple sockets?


I am updating and want to provide seamless reloads in the default configuration. I am unclear about reloading with multiple stats sockets. Let’s assume we have two stats sockets /run/haproxy.sock1 and /run/haproxy.sock2. Would we do the following for a reload?

> haproxy -c -f /etc/haproxy.cfg -q -x /run/haproxy.sock1 -x /run/haproxy.sock2
> kill -USR2 $(cat /run/

Or do we only have to specify the first socket?

Additionally, the documentation suggests using -sf $(cat /run/ for gracefully terminating old processes. I do not know if this is possible with systemd (without a custom startup script). Will -sf simply read a file specified without having to cat it?


I don’t see why you would need multiple stats sockets. 1 socket should suffice.

Please use the contributed systemd unit file in:

You still have to adjust it for seamless reloads, but that would be a minor change I guess:


I appreciate you taking time to respond, but I’m having a difficult time seeing any answers in your response. When running multiple instances via nbproc one should have a corresponding socket for each process, unless I am mistaken. And I do know where the documentation is located. My questions stem directly from reading the documentation. It is not clear on the subject of these questions.


You only mentioned multiple stats sockets in your first post, not nbproc/multiprocess mode.

I don’t see how multiprocess mode would work with seamless reloads, no, that’s not supported.


I thought it would be implied since there is no reason to have multiple sockets otherwise.