php5-fpm não está respondendo

2

Eu migrei para o php5-fpm na configuração nginx ~ 2 meses atrás. Tudo estava bem até alguns dias atrás, quando eu notei que meus sites php não estavam respondendo (o navegador simplesmente aguardava os dados e eventualmente terminava o tempo limite). Reiniciar o php5-fpm ajudou. Aqui está o final do meu /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

As linhas "Acabamento ..." são quando eu reiniciei o serviço php5-fpm manualmente. Eu sei que não é muita informação. Por favor, me diga o que mais é necessário.

Qual pode ser o problema?

    
por muszek 17.02.2013 / 23:38

1 resposta

2

Você tem dois problemas distintos e distintos mostrados neste log.

  1. pm.max_children está definido como muito baixo. Isso controla quantos processos do PHP serão gerados para manipular solicitações de entrada simultâneas. Se houver mais solicitações do que as crianças, as novas conexões terão que esperar ... eventualmente, elas irão esperar para sempre. Levante este valor; encontre-o em /etc/php-fpm.d/www.conf .

    Esta é a causa real do seu problema imediato, embora você tenha alguns problemas mais insidiosos que você provavelmente ainda não notou ...

  2. child ... exited on signal 11 significa que o PHP está travando enquanto atende a solicitações. Dependendo de quando no processamento que caiu, isso pode não ter impacto visível, ou pode resultar em páginas em branco, transferências anuladas, usuários sendo misteriosamente desconectados, etc. Considere atualizar o PHP para a última versão pontual ( 5.3.x ou 5.4.x) e remover ou substituir extensões problemáticas conhecidas, como APC.

por 18.02.2013 / 04:45