Extending File Descriptors
Purpose
Set the maximum number of files that can be opened to 102400 for Nginx. If only a maximum of 1024 files can be opened by the software during the test, the server performance will be affected.
Procedure
- Add the following content to the /etc/security/limits.conf file:
* soft nofile 102400 * hard nofile 102400
- The asterisk (*) indicates all users.
- hard indicates a strict setting. The preset value cannot be exceeded.
- soft indicates an alarm setting. The preset value can be exceeded, but an alarm is generated if it is exceeded.
- Save the file and restart the server.
Parent topic: OS Tuning