nginx基本调优

一.查看系统打开文件数限制


ulimit -n


二.调整系统限制

vi /etc/security/limits.conf

文件最后加上
* soft nofile 51200
* hard nofile 51200



三.修改php-fpm限制


8g的子进程调为300,4g的为100


编辑php-fpm.conf

将max_children修改为300
300


修改文件打开数量:

rlimit_files 为4096


重启服务器

原文地址:https://www.cnblogs.com/itfenqing/p/4429462.html