約2か月前にnginxセットアップでphp5-fpmに移行しました。数日前、php Webサイトが応答しないことに気付くまで、すべてが正常でした(ブラウザーは単にデータを待機し、最終的にタイムアウトします)。 php5-fpmを再起動すると役に立ちました。これが私の/var/log/php5-fpm.logの終わりです:
[09-Feb-2013 07:22:46] NOTICE: [pool www] child 26802 started
[09-Feb-2013 20:09:07] WARNING: [pool www] server reached pm.max_children setting (10), consider raising it
[10-Feb-2013 07:22:40] WARNING: [pool www] child 5986 exited on signal 11 (SIGSEGV - core dumped) after 40414.794799 seconds from start
[10-Feb-2013 07:22:40] NOTICE: [pool www] child 13596 started
[11-Feb-2013 07:22:14] WARNING: [pool www] child 23530 exited on signal 11 (SIGSEGV - core dumped) after 36419.156740 seconds from start
[11-Feb-2013 07:22:14] NOTICE: [pool www] child 31088 started
[12-Feb-2013 06:25:07 [09-Feb-2013 20:09:07] WARNING: [pool www] server reached pm.max_children setting (10), consider raising it
[10-Feb-2013 07:22:40] WARNING: [pool www] child 5986 exited on signal 11 (SIGSEGV - core dumped) after 40414.794799 seconds from start
[10-Feb-2013 07:22:40] NOTICE: [pool www] child 13596 started
[11-Feb-2013 07:22:14] WARNING: [pool www] child 23530 exited on signal 11 (SIGSEGV - core dumped) after 36419.156740 seconds from start
[11-Feb-2013 07:22:14] NOTICE: [pool www] child 31088 started
[12-Feb-2013 06:25:07] WARNING: [pool www] server reached pm.max_children setting (10), consider raising it
[12-Feb-2013 07:22:34] WARNING: [pool www] child 20736 exited on signal 11 (SIGSEGV - core dumped) after 3448.720422 seconds from start
[12-Feb-2013 07:22:34] NOTICE: [pool www] child 23808 started
[13-Feb-2013 06:57:30] WARNING: [pool www] server reached pm.max_children setting (10), consider raising it
[13-Feb-2013 07:21:48] WARNING: [pool www] child 13307 exited on signal 11 (SIGSEGV - core dumped) after 1459.134695 seconds from start
[13-Feb-2013 07:21:48] NOTICE: [pool www] child 13596 started
[13-Feb-2013 08:18:13] WARNING: [pool www] server reached pm.max_children setting (10), consider raising it
[13-Feb-2013 11:14:49] NOTICE: Finishing ...
[13-Feb-2013 11:14:49] NOTICE: exiting, bye-bye!
[13-Feb-2013 11:14:50] NOTICE: fpm is running, pid 16123
[13-Feb-2013 11:14:50] NOTICE: ready to handle connections
[13-Feb-2013 15:21:53] WARNING: [pool www] server reached pm.max_children setting (10), consider raising it
[14-Feb-2013 07:22:23] WARNING: [pool www] child 27208 exited on signal 11 (SIGSEGV - core dumped) after 17743.276891 seconds from start
[14-Feb-2013 07:22:23] NOTICE: [pool www] child 31521 started
[14-Feb-2013 15:21:33] WARNING: [pool www] server reached pm.max_children setting (10), consider raising it
[15-Feb-2013 07:21:51] WARNING: [pool www] child 9699 exited on signal 11 (SIGSEGV - core dumped) after 36679.697975 seconds from start
[15-Feb-2013 07:21:51] NOTICE: [pool www] child 16671 started
[15-Feb-2013 09:35:35] WARNING: [pool www] server reached pm.max_children setting (10), consider raising it
[16-Feb-2013 07:22:18] WARNING: [pool www] child 29553 exited on signal 11 (SIGSEGV - core dumped) after 22986.940724 seconds from start
[16-Feb-2013 07:22:18] NOTICE: [pool www] child 1459 started
[17-Feb-2013 07:21:42] WARNING: [pool www] child 10229 exited on signal 11 (SIGSEGV - core dumped) after 45737.338223 seconds from start
[17-Feb-2013 07:21:42] NOTICE: [pool www] child 18539 started
[17-Feb-2013 08:19:01] WARNING: [pool www] server reached pm.max_children setting (10), consider raising it
[17-Feb-2013 22:27:30] NOTICE: Finishing ...
[17-Feb-2013 22:27:31] NOTICE: exiting, bye-bye!
[17-Feb-2013 22:27:31] NOTICE: fpm is running, pid 24139
[17-Feb-2013 22:27:31] NOTICE: ready to handle connections] WARNING: [pool www] server reached pm.max_children setting (10), consider raising it
[12-Feb-2013 07:22:34] WARNING: [pool www] child 20736 exited on signal 11 (SIGSEGV - core dumped) after 3448.720422 seconds from start
[12-Feb-2013 07:22:34] NOTICE: [pool www] child 23808 started
[13-Feb-2013 06:57:30] WARNING: [pool www] server reached pm.max_children setting (10), consider raising it
[13-Feb-2013 07:21:48] WARNING: [pool www] child 13307 exited on signal 11 (SIGSEGV - core dumped) after 1459.134695 seconds from start
[13-Feb-2013 07:21:48] NOTICE: [pool www] child 13596 started
[13-Feb-2013 08:18:13] WARNING: [pool www] server reached pm.max_children setting (10), consider raising it
[13-Feb-2013 11:14:49] NOTICE: Finishing ...
[13-Feb-2013 11:14:49] NOTICE: exiting, bye-bye!
[13-Feb-2013 11:14:50] NOTICE: fpm is running, pid 16123
[13-Feb-2013 11:14:50] NOTICE: ready to handle connections
[13-Feb-2013 15:21:53] WARNING: [pool www] server reached pm.max_children setting (10), consider raising it
[14-Feb-2013 07:22:23] WARNING: [pool www] child 27208 exited on signal 11 (SIGSEGV - core dumped) after 17743.276891 seconds from start
[14-Feb-2013 07:22:23] NOTICE: [pool www] child 31521 started
[14-Feb-2013 15:21:33] WARNING: [pool www] server reached pm.max_children setting (10), consider raising it
[15-Feb-2013 07:21:51] WARNING: [pool www] child 9699 exited on signal 11 (SIGSEGV - core dumped) after 36679.697975 seconds from start
[15-Feb-2013 07:21:51] NOTICE: [pool www] child 16671 started
[15-Feb-2013 09:35:35] WARNING: [pool www] server reached pm.max_children setting (10), consider raising it
[16-Feb-2013 07:22:18] WARNING: [pool www] child 29553 exited on signal 11 (SIGSEGV - core dumped) after 22986.940724 seconds from start
[16-Feb-2013 07:22:18] NOTICE: [pool www] child 1459 started
[17-Feb-2013 07:21:42] WARNING: [pool www] child 10229 exited on signal 11 (SIGSEGV - core dumped) after 45737.338223 seconds from start
[17-Feb-2013 07:21:42] NOTICE: [pool www] child 18539 started
[17-Feb-2013 08:19:01] WARNING: [pool www] server reached pm.max_children setting (10), consider raising it
[17-Feb-2013 22:27:30] NOTICE: Finishing ...
[17-Feb-2013 22:27:31] NOTICE: exiting, bye-bye!
[17-Feb-2013 22:27:31] NOTICE: fpm is running, pid 24139
[17-Feb-2013 22:27:31] NOTICE: ready to handle connections
「Finishing ...」の行は、php5-fpmサービスを手動で再起動したときのものです。私はそれが多くの情報ではないことを知っています。他に何が必要か教えてください。
何が問題なのですか?
このログに示されている2つの別個の異なる問題があります。
pm.max_children
の設定が低すぎます。これは、同時着信要求を処理するために生成されるPHPプロセスの数を制御します。子が使用可能な数よりも多くの要求が着信した場合、新しい接続は待機する必要があります...最終的には永久に待機します。上げるこの値; /etc/php-fpm.d/www.conf
で見つけます。
これがあなたの差し迫った問題の実際の原因ですが、おそらくまだ気づいていないもっと陰湿な問題がいくつかあります...
child ... exited on signal 11
は、リクエストの処理中にPHPがクラッシュしていることを意味します。クラッシュした処理のwhenによっては、目に見える影響がないか、空白になる場合があります。ページ、転送の中止、ユーザーの不思議なログアウトなど。PHPを最新のポイントリリース(5.3.xまたは5.4.x)に更新し、APCなどの既知の問題のある拡張機能を削除または置換することを検討してください。