今天用着用着,突然大量客户反映网站不能用了,看了看是Apache突然卡住不能访问了!!!赶紧重启了一下,看了了apache的log,原来是不知道哪儿有点问题,过一会儿就会提示process still did not exit, terminating forcefully
网上查询,可能是MaxRequestsPerChild 设置的有点问题.查询后改了,不知道能不能解决这个问题.

[Wed Oct 09 18:42:38.855742 2019] [mpm_winnt:notice] [pid 55640:tid 520] AH00418: Parent: Created child process 78012
[Wed Oct 09 18:42:39.612305 2019] [mpm_winnt:notice] [pid 78012:tid 536] AH00354: Child: Starting 150 worker threads.
[Wed Oct 09 18:43:09.882814 2019] [mpm_winnt:notice] [pid 73720:tid 532] AH00362: Child: Waiting 30 more seconds for 1 worker threads to finish.
[Wed Oct 09 18:43:39.999208 2019] [mpm_winnt:notice] [pid 73720:tid 532] AH00362: Child: Waiting 0 more seconds for 1 worker threads to finish.
[Wed Oct 09 18:43:40.100284 2019] [mpm_winnt:notice] [pid 73720:tid 532] AH00363: Child: Terminating 1 threads that failed to exit.
[Wed Oct 09 18:43:40.100284 2019] [mpm_winnt:notice] [pid 73720:tid 532] AH00364: Child: All worker threads have exited.
[Wed Oct 09 18:43:48.465504 2019] [fcgid:error] [pid 73720:tid 648] FastCGI process 28432 still did not exit, terminating forcefully
[Wed Oct 09 18:43:48.465504 2019] [fcgid:error] [pid 73720:tid 648] FastCGI process 42432 still did not exit, terminating forcefully
[Wed Oct 09 18:43:48.465504 2019] [fcgid:error] [pid 73720:tid 648] FastCGI process 76712 still did not exit, terminating forcefully
[Wed Oct 09 18:43:48.465504 2019] [fcgid:error] [pid 73720:tid 648] FastCGI process 31692 still did not exit, terminating forcefully
[Wed Oct 09 18:43:48.465504 2019] [fcgid:error] [pid 73720:tid 648] FastCGI process 76536 still did not exit, terminating forcefully
[Wed Oct 09 18:43:48.465504 2019] [fcgid:error] [pid 73720:tid 648] FastCGI process 54628 still did not exit, terminating forcefully
[Wed Oct 09 18:59:02.351060 2019] [mpm_winnt:notice] [pid 78012:tid 536] AH00363: Child: Terminating 91 threads that failed to exit.
[Wed Oct 09 18:59:02.354062 2019] [mpm_winnt:notice] [pid 78012:tid 536] AH00364: Child: All worker threads have exited.


1、查找

 

ThreadsPerChild          1920
MaxConnectionsPerChild   100000

 

2、修改为

 

ThreadsPerChild          500
MaxConnectionsPerChild   100000

 

此处主要是为了解决开启了AcceptFilter参数后如果ThreadsPerChild的值大于512会频繁重启apache的问题,ThreadsPerChild是apache工作进程的线程数最大值到1920超出后会报错,MaxConnectionsPerChild是工作进程最大处理多少请求后载入新的进程。


参考:https://blog.csdn.net/dreamer2020/article/details/52849773
https://blog.csdn.net/zltianhen/article/details/8946425