我已经安装了Apache,并且工人mpm似乎有很多进程活动,尽pipeconfiguration已经到位。 我将详细介绍下面的configuration:
StartServers 2 MinSpareThreads 10 MaxSpareThreads 25 ThreadsPerChild 25 MaxClients 150
基于这些设置,我们应该看到最多1个Apache控制进程(uid:root)和6个Apache客户端进程(uid:www)。 这是由于MaxClients / ThreadsPerChild。
但是,我看到共有1个Apache控制进程和9个Apache客户端进程。
在里面
– apache2(root)
– – apache2(www)
– – apache2(www) – 1个线程
– – apache2(www) – 26个线程
– – apache2(www) – 26个线程
在里面
– apache2(www) – 2个线程
– apache2(www)
– apache2(www)
– apache2(www)
我们不会重新启动Apache和服务器,并且每次都会重新加载2-3次,以增加新的VHOST。
任何人都可以启发我什么可能造成这一点? enter code here
MaxClients不确定subprocess的数量 – subprocess的数量乘以ThreadsPerChild的数量确定MaxClients的最大可接受值。
要满足6个subprocess和150个maxclient的值,请使用以下设置:
StartServers 2 ServerLimit 6 MinSpareThreads 10 MaxSpareThreads 35 ThreadsPerChild 25 MaxClients 150
还要注意我修改了MaxSpareThreads的值。 从文档 :
MaxSpareThreads值的范围受到限制。 Apache将根据以下规则自动更正给定的值:
* mpm_netware wants the value to be greater than MinSpareThreads. * For worker the value must be greater or equal than the sum of MinSpareThreads and ThreadsPerChild.