- vi /etc/sysctl.conf
- net.ipv4.tcp_syncookies = 1
- net.ipv4.tcp_tw_reuse=1 #让TIME_WAIT状态可以重用,这样即使TIME_WAIT占满了所有端口,也不会拒绝新的请求造成障碍 默认是0
- net.ipv4.tcp_tw_recycle=1 #让TIME_WAIT尽快回收 默认0
- net.ipv4.tcp_fin_timeout=30
- /sbin/sysctl -p 让修改生效
标签:ima tran start body tco span post hit AC
nginx大量TIME_WAIT的解决办法 netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'
标签:ima tran start body tco span post hit AC
原文地址:https://www.cnblogs.com/gaoyuechen/p/8506719.html