Apache2 每 1 分 3 秒重新啟動一次 - Ubuntu 16.04

Apache2 每 1 分 3 秒重新啟動一次 - Ubuntu 16.04

標題裡已經寫得差不多了。我已經嘗試了我能想到的一切,但 Apache2 每 1 分 3 秒就會重新啟動一次 - 不會失敗。它沒有進行正常的重新啟動,因為每次重新啟動時,用戶端都無法連接,並且在 Chrome 中會遇到「無法存取此網站」的情況。

這種情況發生在使用 Ubuntu 16.04 映像託管在 Linode 上的 VPS 上。據我所知,一切都是預設的。 (我繼承了該網站,但試圖解決這個奇怪的問題。)

Apache 的版本是 2.4.18。

PHP 版本為 7.0.30

網站的流量並不多(每月可能有 1000 次點擊) - 因此流量也不應該造成這種情況。

以下是我從 Apache2 error.log 看到的日誌

[Mon Aug 27 23:04:56.015029 2018] [core:notice] [pid 32672] AH00094: Command line: '/usr/sbin/apache2'
[Mon Aug 27 23:05:56.492903 2018] [mpm_prefork:notice] [pid 32672] AH00169: caught SIGTERM, shutting down
[Mon Aug 27 23:05:58.000463 2018] [:notice] [pid 32730] ModSecurity for Apache/2.9.0 (http://www.modsecurity.org/) configured.
[Mon Aug 27 23:05:58.001156 2018] [:notice] [pid 32730] ModSecurity: APR compiled version="1.5.1"; loaded version="1.5.2"
[Mon Aug 27 23:05:58.001857 2018] [:warn] [pid 32730] ModSecurity: Loaded APR do not match with compiled!
[Mon Aug 27 23:05:58.001959 2018] [:notice] [pid 32730] ModSecurity: PCRE compiled version="8.35 "; loaded version="8.38 2015-11-23"
[Mon Aug 27 23:05:58.002041 2018] [:warn] [pid 32730] ModSecurity: Loaded PCRE do not match with compiled!
[Mon Aug 27 23:05:58.002155 2018] [:notice] [pid 32730] ModSecurity: LUA compiled version="Lua 5.1"
[Mon Aug 27 23:05:58.002230 2018] [:notice] [pid 32730] ModSecurity: YAJL compiled version="2.1.0"
[Mon Aug 27 23:05:58.002300 2018] [:notice] [pid 32730] ModSecurity: LIBXML compiled version="2.9.2"
[Mon Aug 27 23:05:58.002460 2018] [:notice] [pid 32730] ModSecurity: StatusEngine call: "2.9.0,Apache/2.4.18 (Ubuntu),1.5.1/1.5.2,8.35/8.38 2015-11-23,Lua 5.1,2.9.2,<removed_for_SO>"
[Mon Aug 27 23:05:58.060493 2018] [:notice] [pid 32730] ModSecurity: StatusEngine call successfully sent. For more information visit: http://status.modsecurity.org/
[Mon Aug 27 23:05:58.105989 2018] [:notice] [pid 32734] FastCGI: process manager initialized (pid 32734)
[Mon Aug 27 23:05:59.016019 2018] [mpm_prefork:notice] [pid 32731] AH00163: Apache/2.4.18 (Ubuntu) mod_fastcgi/mod_fastcgi-SNAP-0910052141 OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Aug 27 23:05:59.017563 2018] [core:notice] [pid 32731] AH00094: Command line: '/usr/sbin/apache2'
[Mon Aug 27 23:06:59.489457 2018] [mpm_prefork:notice] [pid 32731] AH00169: caught SIGTERM, shutting down

我看到 APR 和 PCRE 的問題不具有相同的版本,但我在另一個線程中讀到這不應該導致我所看到的問題。

如果還有什麼我可以設定來幫助解決這個問題 - 我們將不勝感激,或者如果其他人遇到過類似的事情也會有所幫助。

我已經嘗試過查看 HTOP 來查看正在運行的進程 - 沒有什麼異常,在看到重新啟動命令後我確實看到了 CPU 峰值(考慮到 apache 正在重新啟動,這是有意義的)

我們確實安裝了 logrotate(我見過的另一個常見的事情),但是 logrotate 設定為每週運行,所以我也不認為它會導致這種情況。

我們也在網站上託管 WordPress。

如果我可以添加任何其他可能有幫助的內容,請告訴我。

也檢查了 cronjobs - 沒有 cronjobs

相關內容