Apache 关闭 - 无法获取互斥锁 [英] Apache shutdown - Couldn't grab mutex

查看:43
本文介绍了Apache 关闭 - 无法获取互斥锁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某些我不知道的原因,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.

推荐答案

我在 Ubuntu 17.10 和 Apache 2.4.27 上遇到了同样的错误.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆