51Testing软件测试论坛

标题: 故障: TCP time wait bucket table overflow [打印本页]

作者: 璐璐    时间: 2019-11-8 11:07
标题: 故障: TCP time wait bucket table overflow
故障: TCP: time wait bucket table overflow
现象:TOMCAT服务器对外提供的服务,高峰时出现间歇性的问题,性能尖刺现象明显。
vi /var/log/messages 中出现很多 TCP: time wait bucket table overflow
查看配置
  1. <span style='font-family: 宋体; font-size: 10.5pt; mso-spacerun: "yes"; mso-font-kerning: 1.0000pt; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;'><p style="margin: 0pt;"><span style='font-family: 宋体; font-size: 10.5pt; mso-spacerun: "yes"; mso-font-kerning: 1.0000pt; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;'> </span></p><p style="margin: 0pt;"><span style='font-family: 宋体; font-size: 10.5pt; mso-spacerun: "yes"; mso-font-kerning: 1.0000pt; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;'> cat /proc/sys/net/ipv4/tcp_max_tw_buckets</span></p><p style="margin: 0pt;"><span style='font-family: 宋体; font-size: 10.5pt; mso-spacerun: "yes"; mso-font-kerning: 1.0000pt; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;'> </span></p><p style="margin: 0pt;"><span style='font-family: 宋体; font-size: 10.5pt; mso-spacerun: "yes"; mso-font-kerning: 1.0000pt; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri;'>3000</span></p></span><p style="margin: 0pt;">
  2. </p>
复制代码
修改
  1. echo 20000 > /proc/sys/net/ipv4/tcp_max_tw_buckets
复制代码

以上是临时解决,重启后会丢这个配置。所以还要写到配置文件中
修改配置文件:
  1. vi /etc/sysctl.conf



  2. net.ipv4.tcp_max_tw_buckets = 20000
复制代码










欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2