Home > Article > Backend Development > kernel: TCP: time wait bucket table overflow problem
kernel: TCP: time wait bucket table overflow problem
I recently used elk to collect system logs and found that some machines have many kernel errors
Most of the opinions on the Internet are to increase the kernel parameter net.ipv4.tcp_max_tw_buckets. But I didn’t explain the principle
I thought about it, and actually tw_buckets means time wait bucket table. The table is full.
Why is it full?
<code>netstat -an<span>|more</span></code>
See the link of time_out
Usually it is port 80, which is caused by the web server, so it is natural to think of keepalived.
After that, what I did was to turn off keepalived, and then adjust the value of tcp_max_tw_buckets to 2w. After observing, basically there is no such alarm.
Especially for some clusters that require forwarding backends, I personally think it is best to turn off keepalive, so that fewer connections will be maintained.
The above introduces the problem of kernel: TCP: time wait bucket table overflow, including the relevant aspects. I hope it will be helpful to friends who are interested in PHP tutorials.