------- Original Message -------
On Saturday, August 20th, 2022 at 9:50 AM, Willy Tarreau <w...@1wt.eu> wrote:

> Did you notice if it failed to serve anything and ate CPU from start or
> if it completely started and only then ate CPU ?

It appears to start up normally according to the logs and then it uses 100% 
CPU. I can get to the stats pages and it serves traffic as expected.

I noticed that "systemctl status haproxy" always shows:

Active: activating (start)

Then after a couple of minutes it restarts the process. It does this 
continuously.

Here is the systemd config. This is directly from the source distro with some 
modifications:

[Unit]
Description=HAProxy Load Balancer
After=network-online.target rsyslog.service
Wants=network-online.target rsyslog.service

[Service]
EnvironmentFile=-/etc/default/haproxy
Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid"
ExecStartPre=/usr/local/sbin/haproxy -Ws -f $CONFIG -c -q $EXTRAOPTS
ExecStart=/usr/local/sbin/haproxy -Ws -f $CONFIG -p $PIDFILE $EXTRAOPTS
# Checks the config first.
ExecReload=/usr/local/sbin/haproxy -Ws -f $CONFIG -c -q $EXTRAOPTS
# This saves off the server state before reload which haproxy loads on
# (re)start.
ExecReload=/opt/bin/save_server_state.sh
ExecReload=/bin/kill -USR2 $MAINPID
# This should save server state on stop.
ExecStop=/opt/bin/save_server_state.sh
ExecStopPost=/usr/local/bin/systemd-email-notifier haproxy
KillMode=mixed
Restart=always
SuccessExitStatus=143
Type=notify

[Install]
WantedBy=multi-user.target


We have a staging server that I always deploy to first so I can test anything 
you want me to there w/o affecting production.

Bren

Reply via email to