VPS侦探论坛

 找回密码
 注册
查看: 7572|回复: 2

关于php-fpm.log错误日志提示,军哥帮我看看

[复制链接]
发表于 2014-3-29 23:55:18 | 显示全部楼层 |阅读模式

我的服务器是八核CPU,16G的内存,Nginx的nginx.conf里设置worker_processes的什为16,另外php-fpm.conf设置如下:
  1. [global]
  2. pid = /usr/local/php/var/run/php-fpm.pid
  3. error_log = /usr/local/php/var/log/php-fpm.log
  4. log_level = notice

  5. [www]
  6. listen = /tmp/php-cgi.sock
  7. user = www
  8. group = www
  9. pm = dynamic
  10. pm.max_children = 200
  11. pm.start_servers = 20
  12. pm.min_spare_servers = 4
  13. pm.max_spare_servers = 200
  14. request_terminate_timeout = 5000
复制代码



php-fpm.log错误日志提示

  1. [29-Mar-2014 23:29:35] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 3 idle, and 72 total children
  2. [29-Mar-2014 23:29: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 3 idle, and 80 total children
  3. [29-Mar-2014 23:30:51] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 1 idle, and 114 total children
  4. [29-Mar-2014 23:31:19] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 3 idle, and 134 total children
  5. [29-Mar-2014 23:31:36] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 3 idle, and 149 total children
  6. [29-Mar-2014 23:31:37] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 16 children, there are 3 idle, and 150 total children
  7. [29-Mar-2014 23:31:38] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 2 idle, and 151 total children
  8. [29-Mar-2014 23:31:39] 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 153 total children
  9. [29-Mar-2014 23:31:57] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 3 idle, and 172 total children
  10. [29-Mar-2014 23:31:58] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 16 children, there are 1 idle, and 173 total children
  11. [29-Mar-2014 23:31:59] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 3 idle, and 176 total children
  12. [29-Mar-2014 23:32:34] WARNING: [pool www] server reached pm.max_children setting (200), consider raising it

复制代码
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2014-3-30 09:08:16 | 显示全部楼层


按他的提示还需要调高,按你这个配置200不算多
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2014-3-31 09:04:09 | 显示全部楼层

这个问题解决了,我把它配置成
pm.max_children = 400
pm.start_servers = 20
pm.min_spare_servers = 20
pm.max_spare_servers = 400
request_terminate_timeout = 5000
感谢军哥!
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-11-14 22:16 , Processed in 0.025489 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表