Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to found a way to restart HAProxy without clearing all my counters. I've tried the hot reconfiguration, but neither of the following commands seems to work:

haproxy -f /path/to/haproxy.cfg -p /path/to/ -sf $(cat /path/to/

haproxy -f /path/to/haproxy.cfg -p /path/to/ -st $(cat /path/to/

Both commands reload the configuration but my counters are still being cleared. Perhaps this is not possible?

share|improve this question

A reload is effectively a fancy way of creating a new processes. In HAProxy, stats are kept in each process only and are never persisted anywhere. This is because HAProxy typically chroot's into an empty directory where it can't write anything to. So there is no way to inject stats / counters into new processes.

This btw. is also an issue you will face when you set nbproc > 1. As each processes keeps it's own stats, counters and sticky tables, it's pure chance at which process you end up and which process's counters you observe. These things can not be shared. (apart from sticky tables, where there is a protocol, but I believe this still doesn't work well with nbproc)

share|improve this answer
Thank you very much – Leandro López Mar 29 '11 at 2:24

What version are you running? I believe 1.4 has the option to keep counters across restarts.

share|improve this answer
That's probably the issue, I'm running version 1.3. – Leandro López Jan 29 '11 at 17:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.