Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4729

Looking for stats data of "old" Haproxy process after reload

$
0
0

Hello,

I am running an HAProxy version 2.0.13-2ubuntu0.1.

When I perform a reload on HAProxy to load new configuration, I am aware, that this spawns a new process and therefore (some) stats are reset.

But for me, the old process keeps running, and especially keeps holding “already present” connections.

This brings me in the situation, where the stats page and the stats socket tell me, there are eg. 5 established connections, but in reality, there are >100 connections established in the “old” process.

Is there a way to:

  • Make the new process also showing the existing connections for the old one, or
  • Have the new process taking over already existing connections, or
  • somehow still access the stats socket for that old process?

I would be totally fine, gathering my data from multiple stats sockets, if due to a reload, multiple processes are running. But sadly I seem to only get one socket and only the data from the newest process.

My config:

# Managed by chef

global
  log 127.0.0.1:9001 local0 notice
  log 127.0.0.1:9001 local1 info
  maxconn 100000

  external-check
  spread-checks 5

  stats socket /var/run/haproxy/admin.sock mode 660 expose-fd listeners level admin
  stats socket /var/run/haproxy/haproxy.sock expose-fd listeners mode 666 level user
  stats timeout 30s
  user haproxy
  group haproxy
  daemon

  nbproc 1
  nbthread 4
  cpu-map 1/all 0-1

  tune.ssl.default-dh-param 2048
  tune.bufsize 524288

defaults
  log global
  option  dontlognull
  option  redispatch
  timeout connect 5s
  timeout client  600s
  timeout server  600s
  timeout check   250
  errorfile 400 /etc/haproxy/errors/400.http
  errorfile 403 /etc/haproxy/errors/403.http
  errorfile 408 /etc/haproxy/errors/408.http
  errorfile 500 /etc/haproxy/errors/500.http
  errorfile 502 /etc/haproxy/errors/502.http
  errorfile 503 /etc/haproxy/errors/503.http
  errorfile 504 /etc/haproxy/errors/504.http


listen stats # Define a listen section called "stats"
  bind 127.0.0.1:443  ssl crt /etc/ssl/private/certificate.pem alpn http/1.1
  bind 127.0.0.1:80
  mode http

  http-request redirect scheme https unless { ssl_fc }

  acl AUTH       http_auth(statsuser)
  stats http-request auth unless AUTH

  stats enable  # Enable stats page
  # stats hide-version  # Hide HAProxy version
  stats uri /  # Stats URI
  stats admin if TRUE
  log                  global
  option               httplog
  option               dontlognull
  maxconn              50

listen MyBackend
  mode tcp
  bind 10.0.0.18:188
  option tcplog
  timeout client 8h
  timeout server 8h

  option external-check
  external-check command /var/lib/haproxy/checks/myCheck.sh
  timeout check 500ms
  default-server inter 1s

  server node1.int 10.0.0.25:188 check

Thanks a lot in advance

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>