Apacheサーバーはリクエストバックログと時間がかかりすぎるため、数分間停止することがあります。

Apacheサーバーはリクエストバックログと時間がかかりすぎるため、数分間停止することがあります。

本番サーバーがありますApache 2.4.38存在するDebian 10時々、Webサーバーは正しく機能せず、受信したHTTP要求に対してすぐに応答を送信しません(すべての仮想ホスト要求は、リバースプロキシ宛先に関係なく完全に応答しません)。再起動後、直ちに自己回復するか、一定時間(数秒または数分)が経過すると、突然大量のHTTP応答を送信し始めます。

CPUとRAMの使用量は良く見えますが、そうではありません。正確に何が起こったのか、なぜそのようなことが起こったのかわかりません。 mpm_event.confの設定も変更しましたが、現在は次のように設定されています。

<IfModule mpm_event_module>
        StartServers                     2
        ServerLimit 100
        MinSpareThreads          25
        MaxSpareThreads          75
        ThreadLimit                      128
        ThreadsPerChild          25
        MaxRequestWorkers         400
        MaxConnectionsPerChild   5000
</IfModule>

Apacheエラーログにいくつかのエラーが表示されます。

[Tue Mar 22 19:53:38.339703 2022] [core:error] [pid 3375:tid 140244229465216] AH00046: child process 29595 still did not exit, sending a SIGKILL
[Tue Mar 22 19:53:38.339777 2022] [core:error] [pid 3375:tid 140244229465216] AH00046: child process 26190 still did not exit, sending a SIGKILL
[Tue Mar 22 19:53:38.339825 2022] [core:error] [pid 3375:tid 140244229465216] AH00046: child process 27903 still did not exit, sending a SIGKILL
[Tue Mar 22 19:53:38.339889 2022] [core:error] [pid 3375:tid 140244229465216] AH00046: child process 16907 still did not exit, sending a SIGKILL
[Tue Mar 22 19:53:38.339933 2022] [core:error] [pid 3375:tid 140244229465216] AH00046: child process 26880 still did not exit, sending a SIGKILL
[Tue Mar 22 19:53:38.340000 2022] [core:error] [pid 3375:tid 140244229465216] AH00046: child process 15384 still did not exit, sending a SIGKILL
[Tue Mar 22 19:53:38.340041 2022] [core:error] [pid 3375:tid 140244229465216] AH00046: child process 24971 still did not exit, sending a SIGKILL
[Tue Mar 22 19:53:38.340091 2022] [core:error] [pid 3375:tid 140244229465216] AH00046: child process 9780 still did not exit, sending a SIGKILL
[Tue Mar 22 19:53:38.340130 2022] [core:error] [pid 3375:tid 140244229465216] AH00046: child process 26317 still did not exit, sending a SIGKILL

この問題を解決するには、どの設定を変更できますか?

ベストアンサー1

ワーカープロセスに問題があるようです。その悪い。一部のプラグインがハングしたり、ハードウェアの問題が発生する可能性があります。 Apacheでバグを発見する可能性は低いです。

特に保存に関するエラーがあるかどうかをdmesg確認してください。systemctl

この簡単なチェックで結果が出ない場合は、gdbapache2 プロセスに接続し、シャットダウンせずに子プロセスが停止する場所を正確に確認してください。たぶん名前を解決しようとするプラグインかもしれませんが、ランダムに解決することはできませんか?確実にアクセスできないNFSのファイルにアクセスしていますか?ここではわかりにくいです。

おすすめ記事