Apache prefork 进程丢失

Mik*_*ike 0 process apache-2.2

我们通过 cacti 监控 apache 进程的数量。我注意到进程数上升到 70,然后下降到 20ish。什么会导致 apache 这样做?这是我们的 prefork 设置

StartServers       50
MinSpareServers    10
MaxSpareServers    100
ServerLimit       250
MaxClients        250
MaxRequestsPerChild  3000
Run Code Online (Sandbox Code Playgroud)

小智 5

您已设置 StartServers > MinSpareServers 和 MaxRequestsPerChild。

这意味着在服务器处理了 3000 个请求之后,它就会死掉。然后控制器将查看其余的服务器,并将空闲的数量相加。如果这至少是 10 个,那么它不会重新启动一个。

因此,看起来您的网站同时处理大约 10 个请求,这是正常行为。

可能是您的网站具有特别“突发”类型的点击量,其中一次有大量请求。如果是这种情况,您可能需要增加 MinSpareServers。