@
publicID002 是独立服务器
@
oott123 我的是 php-fpm.conf 配置文件是默认的, 没有修改, 如下
[global]
pid = /usr/local/php/var/run/php-fpm.pid
error_log = /usr/local/php/var/log/php-fpm.log
log_level = notice
[www]
listen = /tmp/php-cgi.sock
listen.backlog = -1
listen.allowed_clients = 127.0.0.1
listen.owner = www
listen.group = www
listen.mode = 0666
user = www
group = www
pm = dynamic
pm.max_children = 20
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 6
request_terminate_timeout = 100
request_slowlog_timeout = 0
slowlog = var/log/slow.log
然后错误日志 php-fpm.log 部分如下:
[26-Sep-2015 08:40:08] WARNING: [pool www] server reached pm.max_children setting (20), consider raising it
[26-Sep-2015 08:41:42] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 0 idle, and 9 tot
al children
[26-Sep-2015 08:41:43] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 16 children, there are 0 idle, and 10 t
otal children
[26-Sep-2015 08:42:03] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 0 idle, and 17 to
tal children
[26-Sep-2015 08:42:04] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 16 children, there are 0 idle, and 18 t
otal children
[26-Sep-2015 08:42:05] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 19 t
otal children
[26-Sep-2015 08:42:07] WARNING: [pool www] server reached pm.max_children setting (20), consider raising it
[26-Sep-2015 08:42:46] WARNING: [pool www] server reached pm.max_children setting (20), consider raising it
[26-Sep-2015 08:46:39] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 0 idle, and 11 to
tal children
根据网上优化的那些去调整, 增加了数值什么的, 或者根据独立服务器建议设置成静态的都不行, 可能我调整不适当, 导致了更严重的问题, 运行一段时间后 502, 而且不会自动恢复!