TCP: time wait bucket table overflow

.TCP: time wait bucket table overflow

 tcp的连接数超出了服务器设置的连接数

1
2
3
4
5
6
[root@test log]# netstat -antp | awk '/^tcp/{++a[$6]}END{for (i in a) printf("%-10s\t%d\n",i,a[i])}'        
[root@test log]# netstat -nt | cut -c 40- | cut -d: -f1 | sort | uniq -c | sort -n
[root@test log]# netstat -nt | cut -d: -f2 | sort | uniq -c | sort -n
先查看下,然后发现TIME_WAIT  数达到1.3W左右,查看tcp_max_tw_buckets 设置的是4000,果断修改
[root@test log]# echo 20000 > /proc/sys/net/ipv4/tcp_max_tw_buckets
或者修改/etc/sysctl.conf中的net.ipv4.tcp_max_tw_buckets
posted @ 2014-07-07 00:42  kissing狐  阅读(206)  评论(0编辑  收藏  举报