1.limit restricts the use of resources by each shell process and its child processes. Each login, or each process?
For example, Ulimit-n 10240 can temporarily change the current session of the shell process file handle limit, after exiting the current window, limit recovery.
For each shell to take effect, add to the system startup script
You can also add the Ulimit-n command before the process starts the script
2. Modify /etc/security/limits to set user-level limits , including soft and hard limits
3.
/proc/sys/fs/file-max, you can set system-level limits
App: Modify network connection limit
1, modify the user process can open the number of files limit the maximum number of concurrent users of the system to the user a single process can open the amount of files limit this is because the system creates a socket handle for each TCP connection, and each socket handle is also a file handle. View process Open File descriptor/ Proc/1234/fd2. Modify the TCP parameter settings Net.ipv4.ip_local_port_range each TCP client connection consumes a unique local port number (this port number is in the system's local port number range limit), If an existing TCP client connection has filled all of the local port numbers, you cannot assign a local port number to the new TCP client connection at this point, so the system returns a failure in the Connect () call and sets the error message to "Can" assignrequested Address "
Linux System limit Knowledge