Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have a load balancer where if we refresh the stats page over and over, we will notice that the Current sessions value will stay stable for a time, say 45-50 sessions per server more or less, then suddenly we will refresh the page and one server will have 0 and the other server will have 2. Then, on the next reload of the stats page, we're right back to 45-50. We will be refreshing the page every 1-2 seconds

My question is, what would cause the stats module to suddenly show that there are only two sessions open, then go right back to the normal session count within a one to two second period?

Edit: I've also found that all stats look like they reset during this period, not just current sessions. For instance, here's a before, during and after on bytes in - it jumps down and back up too - not just current sessions... though I believe Bytes In is a long term "only grows higher " stat, not a "snapshot" stat.

bytes in before: 231,766,635
bytes in during: 7,704,962
bytes in after: 233,395,640

Edit 2: Thanks Willy, looks like you are right. The comment in the config file was misleading there I have to say.

[admin@p2378442 ~]$ ps ax |grep hapro 
9833 pts/0 S+ 0:00 grep hapro 
18375 ? Ss 0:02 /usr/sbin/haproxy -D -f /etc/haproxy/haproxy.cfg -p /var/run/haproxy.pid
18376 ? Ss 0:25 /usr/sbin/haproxy -D -f /etc/haproxy/haproxy.cfg -p /var/run/haproxy.pid 
share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

I suspect that you are running with more than one process and the stats you're seeing are the one of the process that catches your stats request. One more reason never to run more than one process at a time and to remove the "nbproc" line.

share|improve this answer
    
I've changed the config file, will restart it later tonight. Thanks for the help. –  Kyle Hodgson Nov 24 '10 at 16:05
add comment

Your Answer

 
discard

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.