Apache关闭-无法获取互斥锁 [英] Apache shutdown - Couldn't grab mutex
问题描述
出于某些原因,我不知道Apache崩溃了.
For some reasons unknow to me, Apache is crashing.
这是崩溃时的apache日志:
This is the apache log at the moment of the crash:
[Sat Jun 02 02:38:05.196006 2018] [mpm_prefork:emerg] [pid 1122] (43)Identifier removed: AH00144: couldn't grab the accept mutex
[Sat Jun 02 02:38:05.196006 2018] [mpm_prefork:emerg] [pid 1116] (43)Identifier removed: AH00144: couldn't grab the accept mutex
[Sat Jun 02 02:38:05.198767 2018] [mpm_prefork:emerg] [pid 1115] (43)Identifier removed: AH00144: couldn't grab the accept mutex
[Sat Jun 02 02:38:05.199523 2018] [mpm_prefork:emerg] [pid 3924] (43)Identifier removed: AH00144: couldn't grab the accept mutex
[Sat Jun 02 02:38:05.204189 2018] [mpm_prefork:emerg] [pid 1937] (43)Identifier removed: AH00144: couldn't grab the accept mutex
[Sat Jun 02 02:38:05.207362 2018] [mpm_prefork:emerg] [pid 1120] (43)Identifier removed: AH00144: couldn't grab the accept mutex
[Sat Jun 02 02:38:06.057310 2018] [core:alert] [pid 1099] AH00050: Child 1115 returned a Fatal error... Apache is exiting!
[Sat Jun 02 02:38:06.057483 2018] [:emerg] [pid 1099] AH02818: MPM run failed, exiting
我最近在服务器上所做的最后一件事是为我的站点将certbot安装到常规HTTPS证书中.
The last thing I did on the server lately was to install certbot to general HTTPS certificates for my sites.
推荐答案
我在使用Apache 2.4.27的Ubuntu 17.10上遇到了相同的错误.
I was experiencing the same error on Ubuntu 17.10 with Apache 2.4.27.
这似乎与Apache在操作系统上讨论文件锁定有关.当我进入/etc/apache2/apache2.conf
并将Mutex flock
添加到Mutex部分(在ServerRoot部分附近)时,似乎已经解决了该问题.
It appears to have to do with Apache talking to the OS about file locking. When I went into /etc/apache2/apache2.conf
and added Mutex flock
to the Mutex section (near the ServerRoot section), it seems to have solved the problem.
不幸的是,我只能说这使用flock()函数(系统调用?)来处理文件锁定.每个 https://httpd.apache.org/docs/2.4/mod/core.html#mutex
Unfortunately, all I can say is that this uses the flock() function (a system call?) to handle file locking. Per https://httpd.apache.org/docs/2.4/mod/core.html#mutex
所以这有点像个黑魔法,因为我个人对Apache的文件锁定行为还不够熟悉,无法说明它为什么起作用,而我只能说它起作用是因为Apache崩溃似乎已经停止了,但是只有这样远的.但是,它可能对您有所帮助,而且风险似乎较低.
So it's a bit of a black magic fix in that I personally am not familiar enough with Apache's file locking behavior to say why it works, and I can only say it works because the Apache crash seems to have stopped, but only thus far. Nevertheless, it may help you and seems fairly low-risk.
这篇关于Apache关闭-无法获取互斥锁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!