首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何知道PHP上设置了多少个子服务器和服务器

如何知道PHP上设置了多少个子服务器和服务器
EN

Server Fault用户
提问于 2019-05-20 13:02:09
回答 1查看 2.8K关注 0票数 1

我今天意识到一个大问题,太多的流量使我的网站完全瘫痪,但我有一个大服务器来主持它。我得到的是:

代码语言:javascript
复制
[20-May-2019 14:23:02] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 4 idle, and 22 total children
[20-May-2019 14:23:03] 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 30 total children
[20-May-2019 14:23:04] 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 42 total children
[20-May-2019 14:23: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 57 total children
[20-May-2019 14:23:06] 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 72 total children
[20-May-2019 14:23:07] 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 87 total children
[20-May-2019 14:23:08] 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 102 total children
[20-May-2019 14:23:09] 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 117 total children
[20-May-2019 14:23:10] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 9 idle, and 132 total children

但是我认为我已经用这个配置在我的fpm上配置了足够多的子程序:

  • pm.max_children = 100
  • pm.start_servers = 15
  • pm.min_spare_servers = 15
  • pm.max_spare_servers = 25

但我犯了个错误。你知道我可以设置多少来接收更多的流量吗?我有32 of的RAM和8核

EN

回答 1

Server Fault用户

回答已采纳

发布于 2019-05-20 15:20:03

该日志文件意味着110个进程在8秒内启动。注意,它快速地连续启动了32的多个批。pm.min_spare_servers = 15将无法吸收这样的连接增加,响应时间将是可怕的。

保持足够多的空闲进程来吸收最大的连接峰值,并且最大值在此之上。当然,如果您有足够的内存和CPU。试着做这样的事情:

代码语言:javascript
复制
pm.max_children = 500
pm.min_spare_servers = 100
pm.max_spare_servers = 200

继续将其作为能力规划过程的一部分进行调优。例如,您可能有更多的资源来增加。或者,您可能不需要更多的php-fpm,而资源将更好地用于主机上的其他工作负载。

也谈服务器故障:警告:池似乎很忙(您可能需要增加pm.start_服务器,或pm.min/max_备用_(服务器)

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/968089

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档