How to Set Max Open Files for Nginx and Apache?Īfter you have increased the limit on the number of open files for a server, you also have to change the service configuration file. Thus, you have changed Max open files value for a specific service. # cat /proc/3724/limits | grep "Max open files" To check if the values have changed, get the service PID: Open the service settings using systemctl:Īfter making the changes, update the service configuration, and restart it: You can increase the max open file descriptors for a specific service, rather than for the entire operating system. # ulimit -n 50000 Increase the Maximum Number of Open File Descriptors per Service This parameter allows applying open file limits after user authentication.Īfter making any changes, re-open the console, and check the max_open_files value: If not, add it to the end of the config file. To make the new settings permanent, you need to add the following line to the /etc/nf file: fs.file-max = 500000Ĭheck that the file /etc/pam.d/common-session (Debian/Ubuntu) or /etc/pam.d/login (CentOS/RedHat/Fedora) contains the line: session required pam_limits.so This will temporarily increase the open file limit.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |