In concurrent systems, there are often exceptions to the open too much files. Even the system is down. In this case, there are two reasons for the temporary discovery. The first is that the Java program is not written well, Some resources have been opened without closing in time. The second is the Linux system above the configuration. The default number of open files on Linux is 1024. Use command Ulimit- N View. The general 1024 configuration is not suitable for concurrent systems. It should be bigger. At the same time, if you use Nginx to do reverse proxy and load balancing. It is also best to set the number of open files. The next is our Java program. This is what we are concerned about. First on the Linux system to find the PID of the Java system I used to use the command for PS aux|grep Java first row of the second column that number is the Java system PID. Then use Lsof-p [Java system pid]|wc-l To see how many files the Java system opens. If there is no problem with the Java program. The number shown will stabilize to a certain extent. If it is true that the Java program is not written well. That number will always go up. Cause the system to collapse
System concurrency Report too much open files error