我今天意识到一个大问题,太多的流量使我的网站完全瘫痪,但我有一个大服务器来主持它。我得到的是:
[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上配置了足够多的子程序:
但我犯了个错误。你知道我可以设置多少来接收更多的流量吗?我有32 of的RAM和8核
发布于 2019-05-20 15:20:03
该日志文件意味着110个进程在8秒内启动。注意,它快速地连续启动了32的多个批。pm.min_spare_servers = 15将无法吸收这样的连接增加,响应时间将是可怕的。
保持足够多的空闲进程来吸收最大的连接峰值,并且最大值在此之上。当然,如果您有足够的内存和CPU。试着做这样的事情:
pm.max_children = 500
pm.min_spare_servers = 100
pm.max_spare_servers = 200继续将其作为能力规划过程的一部分进行调优。例如,您可能有更多的资源来增加。或者,您可能不需要更多的php-fpm,而资源将更好地用于主机上的其他工作负载。
https://serverfault.com/questions/968089
复制相似问题