1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| ulimit -a ulimit -n
ulimit -n 65535
vi /etc/security/limits.conf * soft nofile 65535 * hard nofile 65535 * soft nproc 65535 * hard nproc 65535
reboot
events { worker_connections 4096; use epoll; multi_accept on; }
systemctl status nginx vi /usr/lib/systemd/system/nginx.service [Service]增加 LimitNOFILE=65535
systemctl daemon-reload systemctl restart nginx
ps -ef |grep nginx cat /proc/31668/limits Max open files 65535 65535 files
|