TCP: time wait bucket table overflow

今天上午突然发现一台web服务器连接告警,查看/var/log/message的日记文件,发现有如下错误:
Nov  3 11:40:47 dweb1 kernel: __ratelimit: 1163 callbacks suppressed
Nov 3 11:40:47 dweb1 kernel: TCP: time wait bucket table overflow
Nov 3 11:40:47 dweb1 kernel: TCP: time wait bucket table overflow
Nov 3 11:40:47 dweb1 kernel: TCP: time wait bucket table overflow
Nov 3 11:40:47 dweb1 kernel: TCP: time wait bucket table overflow
Nov 3 11:40:47 dweb1 kernel: TCP: time wait bucket table overflow
Nov 3 11:40:47 dweb1 kernel: TCP: time wait bucket table overflow
Nov 3 11:40:47 dweb1 kernel: TCP: time wait bucket table overflow
Nov 3 11:40:47 dweb1 kernel: TCP: time wait bucket table overflow
Nov 3 11:40:47 dweb1 kernel: TCP: time wait bucket table overflow
Nov 3 11:40:47 dweb1 kernel: TCP: time wait bucket table overflow
请问这个主要是因为什么,抛弃了长链接吗?
已邀请:

采菊篱下 - 无分享不快乐 助力技术开源分享 运维一枚

赞同来自: being Nock

这应该是你的网站的PV较大,然后导致超出了系统默认的time_wait数量值,默认服务器的TCP连接数,内核中为5000,你可以如下操作修改:
# echo 30000 > /proc/sys/net/ipv4/tcp_max_tw_buckets
写入/etc/sysctl.conf使之永久生效
# echo  'net.ipv4.tcp_max_tw_buckets = 30000' >> /etc/sysctl.conf
# sysctl -p

要回复问题请先登录注册