Apache 因错误而暂停:无效参数:AH00146:无法释放接受互斥锁

Apache 因错误而暂停:无效参数:AH00146:无法释放接受互斥锁

我的 Web 服务器运行 Debian Bullseye 已经运行多年,没有任何问题。一切都是最新的。Apache 版本是 2.4.54。昨天我注意到我的网站都无法运行,所以我登录到我的服务器,发现 Apache 不再运行。我重新启动了 Apache 并检查了它的日志文件以查看发生了什么。日志文件显示以下内容:

[Tue Dec 13 23:46:50.629635 2022] [mpm_prefork:emerg] [pid 2079339] (22)Invalid argument: AH00146: couldn't release the accept mutex
[Tue Dec 13 23:46:51.397665 2022] [core:alert] [pid 2036789] AH00050: Child 2079339 returned a Fatal error... Apache is exiting!
[Tue Dec 13 23:46:51.397743 2022] [:emerg] [pid 2036789] AH02818: MPM run failed, exiting

由于 Apache 之前从未崩溃过,我认为这只是一次性问题,因此就此作罢。但今天我再次注意到我的网站瘫痪了,Apache 也不再运行。检查 error.log,我看到了以下内容:

[Wed Dec 14 15:10:58.522933 2022] [mpm_prefork:emerg] [pid 2543516] (22)Invalid argument: AH00146: couldn't release the accept mutex
[Wed Dec 14 15:10:58.600767 2022] [mpm_prefork:emerg] [pid 2543951] (22)Invalid argument: AH00146: couldn't release the accept mutex
[Wed Dec 14 15:10:58.821819 2022] [mpm_prefork:emerg] [pid 2543852] (22)Invalid argument: AH00146: couldn't release the accept mutex
[Wed Dec 14 15:10:58.985176 2022] [mpm_prefork:emerg] [pid 2543789] (22)Invalid argument: AH00146: couldn't release the accept mutex
[Wed Dec 14 15:10:59.020098 2022] [mpm_prefork:emerg] [pid 2545055] (22)Invalid argument: AH00146: couldn't release the accept mutex
[Wed Dec 14 15:10:59.054757 2022] [mpm_prefork:emerg] [pid 2543845] (22)Invalid argument: AH00146: couldn't release the accept mutex
[Wed Dec 14 15:10:59.088885 2022] [mpm_prefork:emerg] [pid 2543953] (22)Invalid argument: AH00146: couldn't release the accept mutex
[Wed Dec 14 15:10:59.337919 2022] [core:alert] [pid 2080897] AH00050: Child 2543516 returned a Fatal error... Apache is exiting!
[Wed Dec 14 15:10:59.338011 2022] [:emerg] [pid 2080897] AH02818: MPM run failed, exiting

所以现在我猜这不是一次性问题,一定是出了什么问题。我搜索了互联网,虽然很多人以前遇到过这个问题,但我找不到导致这个问题的原因。即便如此,到处都提供了相同的解决方案。将以下行添加到apache2.conf

Mutex posixsem

我添加了该行,以便查看是否确实解决了问题。 仍然存在的问题是什么原因造成的? Apache 崩溃前我对系统进行的最后一次更新是将近 2 周前(摘自我的 apt history.log):

Start-Date: 2022-12-01  01:14:02
Commandline: apt-get upgrade
Upgrade: php7.4-soap:amd64 (7.4.30-1+deb11u1, 7.4.33-1+deb11u1), php7.4-mbstring:amd64 (7.4.30-1+deb11u1, 7.4.33-1+deb11u1), krb5-locales:amd64 (1.18.3-6+deb11u2, 1.18.3-6+deb11u3), libgssapi-krb5-2:amd64 (1.18.3-6+deb11u2, 1.18.3-6+deb11u3
End-Date: 2022-12-01  01:16:00

第一次崩溃后,我进行了另一次更新:

Start-Date: 2022-12-13  23:58:36
Commandline: apt-get upgrade
Upgrade: libopenexr25:amd64 (2.5.4-2, 2.5.4-2+deb11u1), snapd:amd64 (2.49-1+deb11u1, 2.49-1+deb11u2)
End-Date: 2022-12-13  23:58:47

这(显然)没有帮助。那么,是什么原因导致了这些崩溃?可能是外部因素(攻击/格式错误的请求)吗?

相关内容