Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The solution to the problem of Home connection timeout

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

This morning, I found that the new home node reported an error and could not be connected, and some nodes found problems, indicating that the service problem was unlikely, so I thought it was the kernel parameter problem. Sure enough, because it is a new node, there is no optimization of the system. Now is the time to find the problem and record the process:

1. Check the connection status and summarize it.

Netstat-n | awk'/ ^ tcp/ {+ + S [$NF]} END {for (an in S) print a, S [a]}'

CLOSE_WAIT 42

ESTABLISHED 0

TIME_WAIT 1006

2. Optimize kernel parameters first

Vi / etc/sysctl.conf

Net.ipv4.tcp_syncookies = 1

Net.ipv4.tcp_tw_reuse=1 # allows TIME_WAIT status to be reused so that even if TIME_WAIT occupies all ports, it does not reject new requests and cause obstacles. The default is 0.

Net.ipv4.tcp_tw_recycle=1 # Let TIME_WAIT recycle default 0 as soon as possible

Net.ipv4.tcp_fin_timeout=30

/ sbin/sysctl-p # let the parameter take effect

3. Restart related java services

Although this is the common sense of the operation and maintenance staff to find the problem, it may be forgotten because of the change of environment. Record it here.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report