请问,TCP的non_established连接数离奇高,能怎么解决?
大概2天会出现一次,持续的时间几个小时到十几个小时,不处理也会自行消退。
用的阿里云的ECS,提交的工单是做tcp性能优化,设置之后问题依旧。
non_established连接数会多到8000-10000,但cpu和内存并没有多大影响,
阿里云也帮忙排除是攻击所致。
=======下面是当前的/etc/sysctl.conf配置内容========
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
vm.swappiness = 0
net.ipv4.neigh.default.gc_stale_time=120
# see details in https://help.aliyun.com/knowledge_detail/39428.html
net.ipv4.conf.all.rp_filter=0
net.ipv4.conf.default.rp_filter=0
net.ipv4.conf.default.arp_announce = 2
net.ipv4.conf.lo.arp_announce=2
net.ipv4.conf.all.arp_announce=2
# see details in https://help.aliyun.com/knowledge_detail/41334.html
#net.ipv4.tcp_max_tw_buckets = 5000
#net.ipv4.tcp_syncookies = 1
#net.ipv4.tcp_max_syn_backlog = 8192
#net.ipv4.tcp_synack_retries = 2
kernel.sysrq = 1
net.core.somaxconn=8192
net.ipv4.tcp_tw_reuse=1
net.ipv4.tcp_tw_recycle=1
#net.ipv4.tcp_fin_timeout=20
#net.ipv4.tcp_keepalive_time=1200
#added by fubin
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_fin_timeout = 1
net.ipv4.tcp_max_tw_buckets = 5000
net.ipv4.tcp_syn_retries = 1
net.ipv4.tcp_synack_retries = 1
net.ipv4.tcp_max_syn_backlog = 262144
net.core.netdev_max_backlog = 262144
#net.ipv4.tcp_max_orphans = 262144
net.ipv4.tcp_keepalive_time = 60
net.ipv4.ip_local_port_range=1024 65535
vm.overcommit_memory=1
===========================================================
有时间帮我解决一下,谢谢
作者:evilman 发布时间:18年10月29日 可选操作:
删除 回复Jexus、Mono,各是什么版本?你的应用程序中是否有HttpWebRequest、WebClent之类的组件调用?数据库是什么?长时间不关闭的目标端口是什么?
作者:yunei 发布时间:18年11月04日 可选操作:
删除 回复