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 MySQL from the official website: This...
Overview Let's summarize some SQL statements ...
First of all, I don't know why I can't lo...
<br />The page uses UTF8 encoding, and the h...
jQuery form validation example / including userna...
Recently, an error occurred while starting MySQL....
Solution-1: Download the msvcr100.dll file (find ...
In the hive installation directory, enter the con...
Recently, I have done a simple study on the data ...
Inside the style tag of the vue component, there ...
I. Introduction Docker technology is very popular...
MySQL has non-standard data types such as float a...
Install using the MSI installation package Downlo...
How to view files in a docker image 1. If it is a...
I am almost going moldy staying at home due to th...