linux Apacheが止まっている
2011/05/23
PHPを実行していて気づいたら力尽きている。
エラーログ
まずは、エラーログの確認
/var/log/httpd/
エラーログの中を見ると下記のような感じ。
[warn] child process 12345 still did not exit, sending a SIGTERM
[notice] SIGHUP received. Attempting to restart
[notice] Digest: generating secret for digest authentication …
[notice] Digest: done
[notice] Apache/2.2.3 (CentOS) configured — resuming normal operations
[notice] SIGHUP received. Attempting to restart
[notice] Digest: generating secret for digest authentication …
[notice] Digest: done
[notice] Apache/2.2.3 (CentOS) configured — resuming normal operations
分かるように書いて欲しいと思う今日この頃…。
[warn] child process 12345 still did not exit, sending a SIGTERM
- child process 12345 still did not exit
- プロセス12345が、まだ終了していない
- sending a SIGTERM
- SIGTERMを送信
※SIGTERM:シグナルの一つで、プロセスの終了を表わす(標準の動作はプロセスの終了)
ようは…「プロセス12345」が終了していないから「プロセスの終了」を「送信」した。
[notice] SIGHUP received. Attempting to restart
- SIGHUP received.
- SIGHUPを受信
- Attempting to restart
- 再起動しようとすると
※SIGHUP:シグナルの一つで、ハングアップを表わす(標準の動作はプロセスの終了)
「プロセスの終了」を受信したよ。次に再起動しようとした。
[notice] Digest: generating secret for digest authentication …
- generating secret for digest authentication …
- Digest認証(ダイジェスト認証)のための秘密を生成する…
※Digest認証:HTTPの認証方法の一つ。
意味わかんね…。
[notice] Digest: done
- done
- 完了
つまり、再起動してから、Digest認証のための何かをやったってことかな。
[notice] Apache/2.2.3 (CentOS) configured — resuming normal operations
- resuming normal operations
- 通常の操作を再開
全部の作業が終ったよってことだよね?
ログローテート
ログを見て想像できることは…「Apacheを再起動したから、実行していたPHPも終了」ってことになるのかな。
さらに調べると「ログローテート」というものが原因の様子。
そもそも「ログローテート」って何よ?
「ログローテート」とはログファイルが溜まりすぎると困るから複数のファイルを使いまわすってことっぽい。で、古いログファイルは削除。
下記に「ログローテート」の設定とか内容が記載されている様子。
/etc/logrotate.d/apache
/etc/cron.daily/logrotate
/etc/cron.daily/logrotate
こっから先は私にとっては荷が重過ぎるので今回は見送ることにする。