Apache 意外停止

Apache 意外停止

突然我发现我服务器上的 apache 停止了!!我不知道为什么我在 apache error_log 上发现了这两行,也不知道它们是否与发生的问题有关

[mpm_event:notice] [pid 1428:tid 139958315632512] AH00492: caught SIGWINCH, shutting down gracefully

[core:warn] [pid 1428:tid 139958315632512] AH00045: child process 27440 still did not exit, sending a SIGTERM

我只需重新启动 apache 就可以了。但这非常严重。问题是什么?我可以设置 apache 在失败时自动重新启动吗?

服务器是 centos 7 和 apache 2.4 和 PHP 5.6,并使用 centos web 面板,提前致谢。

答案1

回答你的问题:是的,如果失败,你可以自动重启 Apache。在你的 systemd 单元文件中添加Restart=always

文档在这里: https://www.freedesktop.org/software/systemd/man/systemd.service.html#Restart=

当然,这不是解决方案,而只是问题的掩饰。您应该查看导致 Apache 关闭的原因。

相关内容