- 积分
- 16843
在线时间 小时
最后登录1970-1-1
|

楼主 |
发表于 2020-7-26 11:01:06
|
显示全部楼层
Jul 26 10:46:26 centos7 systemd[1]: Started HAProxy Load Balancer.4 L# c8 q% e6 f
Jul 26 10:46:26 centos7 systemd[1]: Starting HAProxy Load Balancer...- n' P7 D# H& `+ v
Jul 26 10:46:26 centos7 haproxy-systemd-wrapper[2744]: haproxy-systemd-wrapper: executing /usr/sbin/haproxy ...-Ds1 G2 u- b- r9 P8 `; l: m" j9 N- }
Jul 26 10:46:26 centos7 haproxy-systemd-wrapper[2744]: [WARNING] 207/104626 (2745) : config : 'option forwar...de.+ N3 S+ a( C0 f& R4 A: W
Jul 26 10:46:26 centos7 haproxy-systemd-wrapper[2744]: [ALERT] 207/104626 (2745) : Starting proxy Stats: can...00]
F$ q" |* f( n: y+ x! F5 X9 ^7 j1 pJul 26 10:46:26 centos7 haproxy-systemd-wrapper[2744]: [ALERT] 207/104626 (2745) : Starting proxy mariadb_cl...06]7 u' z7 b4 Z$ u/ ?' n
Jul 26 10:46:26 centos7 haproxy-systemd-wrapper[2744]: haproxy-systemd-wrapper: exit, haproxy RC=11 x V+ G- J: S. s6 W2 s6 h2 U
Jul 26 10:46:26 centos7 systemd[1]: haproxy.service: main process exited, code=exited, status=1/FAILURE9 p8 ], `9 Q& a# t. e
Jul 26 10:46:26 centos7 systemd[1]: Unit haproxy.service entered failed state.
6 A) i8 E7 C, U2 J/ W: M2 H( [Jul 26 10:46:26 centos7 systemd[1]: haproxy.service failed.
9 @& f8 q4 ]% bHint: Some lines were ellipsized, use -l to show in full.
3 ~6 o) R1 W6 m+ {% u' g6 @0 y" y! k2 w. L, u; L0 H! f5 V
主要是修改内核参数进行限制:% G6 i& w# ?! p
! S! D7 Y* ]2 `! n8 r3 l9 w
在sysctl.conf文件中加入些参数:
' G) O5 k/ Y I8 M+ M' U& x+ |: U: [1 C
net.ipv4.ip_nonlocal_bind = 1
' g' y! k& ?$ b6 hnet.nf_conntrack_max=10485767 b" M8 W8 D7 |" a8 t
net.ipv4.tcp_keepalive_intvl = 3$ H+ R3 L" E! M
net.ipv4.tcp_keepalive_time = 60# B* c: V, ~: h& C$ C5 h9 S2 e7 r
net.ipv4.tcp_keepalive_probes = 8
# F3 C6 M2 j2 h* `
1 h" G3 W: {. F. j$ |: @8 s6 T- w! u, w6 W
1 y/ `1 P4 k: ^4 L% P$ Y0 p
执行下
0 C2 a( f# x4 fsysctl -p
/ u7 Z; N W; {8 e9 ~$ D# i. l' E
. `4 Q+ W" b& k0 J6 i$ j' h7 z$ ~: j% b/ Z$ E" d; E! P9 \
重启haproxy服务即可
4 |4 o1 |) X# Y) y' @2 |* ` |
|