php-fpm总是宕机

卡卡吉利 2016-04-07 10:15:23
Nginx+php5-fpm,部署的一个开源的项目,已经几个月了,从来没出问题,最近一周总是出现无法访问的情况,重启fpm就好了,不太会看日志,谁能帮我看看是什么问题:
[05-Apr-2016 18:00:09] 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 23 total children
[05-Apr-2016 18:00:10] 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 25 total children
[05-Apr-2016 18:00:11] 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 27 total children
[05-Apr-2016 18:00:12] 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 29 total children
[05-Apr-2016 18:00:13] 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 32 total children
[06-Apr-2016 13:59:17] WARNING: [pool www] server reached pm.max_children setting (50), consider raising it
...全文
276 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
果酱很好吃 2016-04-07
  • 打赏
  • 举报
回复
8G内存,试试这个配置

pm = dynamic
pm.max_children = 200
pm.start_servers = 100
pm.min_spare_servers = 30
pm.max_spare_servers = 200
pm.max_requests = 1000
卡卡吉利 2016-04-07
  • 打赏
  • 举报
回复
引用 2 楼 xuzuning 的回复:
表面上看是 并发数不够,实际是内存不够用 你最近又添加了什么服务类软件?
系统负载才零点几,个位数并发,8G内存.自从部署上就没有改过,机器是独立的,没有别的服务
卡卡吉利 2016-04-07
  • 打赏
  • 举报
回复
引用 1 楼 jam00 的回复:
你这是进程不够用,适当增大你的 pm.max_children
我增大了,但是重启后访问很慢.系统负载蔡零点几
xuzuning 2016-04-07
  • 打赏
  • 举报
回复
表面上看是 并发数不够,实际是内存不够用 你最近又添加了什么服务类软件?
果酱很好吃 2016-04-07
  • 打赏
  • 举报
回复
你这是进程不够用,适当增大你的 pm.max_children

21,886

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧