Fix too many FIN_WAIT_2 connections under freebsd

来源:互联网 发布:海森赛尔 知乎 编辑:程序博客网 时间:2024/05/21 20:48
原贴:http://www.sofee.cn/blog/2006/08/26/33/

Fix too many FIN_WAIT_2 connections under freebsd

No Tags

查看FIN_WAIT_2连接数:

bsd#netstat -an | grep FIN_WAIT_2 | wc -l
2523

修改Lighttpd配置文件,加入下面这条语句:

server.max-keep-alive-requests = 0
bsd#netstat -an | grep FIN_WAIT_2 | wc -l
91

如果服务器开启了ipfw2防火墙的话,还需要执行:

sysctl -w net.inet.ip.fw.dyn_keepalive=0

p.s. 若为APACHE服务器,同理。

 
原创粉丝点击