1. Problem
Too many open files is a common error in Linux systems. Literally, it means that the program has too many open files. However, files here not only mean files, but also include open communication links (such as sockets), listening ports, etc., so sometimes they can also be called handles. This error is usually also called the number of handles exceeds the system limit.
2. Solution
2.1 Use command: ulimit -a to view the current user's default maximum number of open files

2.2 Modify the number of open files
① sudo -s # Switch to root privileges first
② vi /etc/profile # Modify the file
③ Add a line at the end of the file: ulimit -n 65535
④ Save and exit
⑤ source /etc/profile # Reload the modified environment variable file

2.3 Recheck, ulimit -a
