默认为1修改为8 nbproc 8 [root@localhost ~]# service haproxy restart Stopping haproxy: [ OK ] Starting haproxy: [WARNING] 317/114841 (1478) : Proxy 'status': in multi-process mode, stats will be limited to process assigned to the current request. [WARNING] 317/114841 (1478) : stats socket will not work as expected in multi-process mode (nbproc > 1), you should force process binding globally using 'stats bind-process' or per socket using the 'process' attribute. [ OK ] [root@localhost ~]# [root@localhost ~]# service haproxy restart Stopping haproxy: [ OK ] Starting haproxy: [ OK ] [root@localhost ~]# 修改 全局配置 global log 127.0.0.1 local2 chroot /var/lib/haproxy pidfile /var/run/haproxy.pid nbproc 8 maxconn 4000 user haproxy group haproxy daemon stats bind-process 1 # turn on stats unix socket stats socket /var/lib/haproxy/stats listen status bind-process 1 bind *:8080 stats enable stats hide-version stats uri /admin?stats stats auth admin:123456 stats realm (Haproxy\ statistic) stats refresh 2s 等效 listen status 0.0.0.0:8080 bind-process 1 stats enable stats hide-version stats uri /admin?stats stats auth admin:123456 stats realm (Haproxy\ statistic) stats refresh 2s
11 月 182014