Solution to a large number of SYN_SENT connection problems under Linux

  • 2020-05-13 04:03:20
  • OfStack

Today, after migrating an VPS, it was discovered that the original VPS had a large number of syn_sent connections to port 80 of the new VPS.

At first, I thought that the link information of configuration files on the original VPS was written because of the domain name (because the domain name resolution has been changed to the IP of the new VPS, and some parts of DNS have not been refreshed), but after checking with the following command, I found that this is not the case.

netstat -atnp

Parameter p can see PID and Program name. As long as the service port is opened on the machine, PID and Program name will be available. After checking, I found that it was the wget program that was occupied. It suddenly occurred to me that I had deployed a script of check regularly to check whether the website was normal or not.

The solution is simple, as long as the bash program's scheduled tasks stop. If it is an abnormal program, just kill the PID with the kill command. If there are many processes, such as the wget program, then only pkill-9 wget needs to be executed.


Related articles: