ITPub博客

首页 > Linux操作系统 > Linux操作系统 > So many TIME_WAIT connection

So many TIME_WAIT connection

原创 Linux操作系统 作者:zzhen163 时间:2011-08-26 15:35:42 0 删除 编辑

 
problem:
So many  TIME_WAIT connection in server. 

SocketsUsageWarning: Active: 2570; TIME_WAIT: 2507; Usage: 97%

tcp        0      0 10.xxx.xxx.xxx:80           10.xx.xx.xx:25270          TIME_WAIT  
tcp        0      0 10.xxx.xxx.xxx:80           10.xx.xx.xx:52659          TIME_WAIT  
tcp        0      0 10.xxx.xxx.xxx:80           10.xx.xx.xx:52915          TIME_WAIT  
tcp        0      0 10.xxx.xxx.xxx:80           10.xxx.xx.xx:5040           TIME_WAIT  

Solution:

[root@aaa1 ~]#vi /etc/sysctl
增 加或修改net.ipv4.tcp_tw值:
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
使内核参数生效:
[root@aaa1 ~]# sysctl -p
[root@aaa1 ~]# sysctl -a|grep net.ipv4.tcp_tw
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/223555/viewspace-705875/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-09-27

  • 博文量
    35
  • 访问量
    64099