1. Check the maximum number of open files in the system #View the current resource limit settings ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 7268 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 7268 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited # View the maximum number of open files in the system ulimit -n 1024 2. Set the maximum limit on the number of files opened by the system #Permanently set the maximum limit on the number of open files in the system vi /etc/security/limits.conf #Add parameters at the end... *soft nofile 102400 * hard nofile 102400 #Temporarily set the maximum limit on the number of open files in the system ulimit -n 102400 #Test operation, whether to permanently load the configuration after restart #System restart init 6 #Test successful, set the maximum limit on the number of open files correctly ulimit -n 102400 3. Set the maximum limit on the number of files opened by nginx vi /usr/local/nginx/conf/nginx.conf user nginx; worker_processes 4; worker_cpu_affinity 0001 0010 0100 1000; worker_rlimit_nofile 102400; ...... #Check if there is any problem with nginx configuration nginx -t nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful #Reload nginx nginx -s reload The maximum number of open files in the system is The maximum limit on the number of open files in nginx should be as consistent as possible Summarize This is the end of this article about configuring the maximum number of files that can be opened by each Nginx process. For more information about the maximum number of files that can be opened by each Nginx process, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: How to configure MySQL master-slave replication under Windows
>>: Mysql database design three paradigm examples analysis
1. Download address: http://dev.mysql.com/downloa...
"Development is more than just writing code&q...
Table of contents 1. MySQL 8.0.18 installation 2....
Table of contents Create a Vite project Creating ...
Now many mobile phones have the function of switc...
1. Introduction Since pictures take up a lot of s...
Record the installation and configuration method ...
Table of contents Preface ErrorBoundary Beyond Er...
This method was edited on February 7, 2021. The v...
Nowadays, many websites do not allow direct copyin...
Disk quota is the storage limit of a specified di...
Table of contents Semaphore Nginx hot deployment ...
A few days ago, I watched a video of a foreign gu...
Table of contents 1. Digital Enumeration 2. Strin...
I have read a lot of knowledge and articles about...