Linux haproxy服务器正在断开大量连接
我正在运行一个haproxy服务器,它服务于特定的流量,客户继续报告连接从他们的终端断开。不确定是什么原因造成的 我的sysctl.conf如下所示Linux haproxy服务器正在断开大量连接,linux,high-availability,haproxy,Linux,High Availability,Haproxy,我正在运行一个haproxy服务器,它服务于特定的流量,客户继续报告连接从他们的终端断开。不确定是什么原因造成的 我的sysctl.conf如下所示 net.ipv4.tcp_tw_reuse = 1 net.ipv4.ip_local_port_range = 1024 65023 net.ipv4.tcp_max_syn_backlog = 10240 net.ipv4.tcp_max_tw_buckets = 400000 net.ipv4.tcp_max_orphans = 60000
net.ipv4.tcp_tw_reuse = 1
net.ipv4.ip_local_port_range = 1024 65023
net.ipv4.tcp_max_syn_backlog = 10240
net.ipv4.tcp_max_tw_buckets = 400000
net.ipv4.tcp_max_orphans = 60000
net.ipv4.tcp_synack_retries = 3
net.core.somaxconn = 10000
ulimit-n也返回65535
My/etc/haproxy/haproxy.cfg如下所示
global
maxconn 50000 # Max simultaneous connections from an upstream server
spread-checks 5 # Distribute health checks with some randomness
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
user haproxy
group haproxy
daemon
defaults # Apply to all services
log global
mode http
option httplog
maxconn 25000
balance roundrobin
option abortonclose # abort request if client closes output channel while waiting
option httpclose # add "Connection:close" header if it is missing
option forwardfor # insert x-forwarded-for header
option redispatch # any server can handle any session
retries 3
timeout client 60s
timeout connect 30s
timeout server 30s
timeout check 30s
timeout http-request 6s
stats enable
stats uri /stats # Real path redacted
stats realm Haproxy\ Statistics
stats auth root:*******! # Real credentials redacted
#monitor-uri /monitor # Returns 200 if we're up; real path redacted
errorfile 503 /etc/haproxy/errors/503.http
frontend incoming *:80
reqadd X-Forwarded-Proto:\ http
monitor-uri /haproxy_test
default_backend my_app
backend my_app
balance roundrobin
option httpchk /api/health
server my_server_A 0.1.2.3:80 check inter 5000 fastinter 1000 fall 3 rise 1 weight 1 maxconn 5000
server my_server_B 4.5.6.7:80 check inter 5000 fastinter 1000 fall 3 rise 1 weight 1 maxconn 5000
可能导致连接从另一侧断开的设置是什么。大多数报告的辍学者来自爱尔兰的都柏林,服务器在美国西部,如果这有帮助的话