The previous test encountered a "too many open files" issue. Ulimit-hn found out that the maximum open file number on the server is 4096. Wrote a simple script to detect that the process created by the number of FD is increasing, 8 minutes later reached the upper limit and then the program error, most of which FD is about the socket.
Install lsof on the server to view the current process open file and locate the most frequently occurring communication host and port. The last discovery is a Java program bug, and the method that executes every two seconds continuously creates a new httpclient. Fixed a bug after the process created the number of FD stable at 24.
Lsof-i-a-p $PID can list all the network files that the process opens. The simple detection script used is
#!/bin//proc/$ (PSgrepgrep grepawk'{print $} ')/fdwhiletruedolsgrepWC -lsleep5 Done
Too many open files problem on Linux server