O Apache Server para de servir páginas aleatoriamente

1

Estou tentando resolver esse problema nos últimos dois dias e não consegui.

Eu tenho um servidor Ubuntu 14.04 com o Apache 2.4.7. O Apache irá parar aleatoriamente o conteúdo e a única maneira de corrigi-lo temporariamente é reiniciar o Apache. Eu tenho SWAP habilitado com 4 GB de espaço, notei que quando ele falha, a RAM física parece encher e, em seguida, o SWAP também começa a encher.

Depois de pesquisar bastante, descobri que isso poderia ter algo a ver com o MaxClients. Meu servidor é bem pequeno, com apenas 2 GB de RAM e um processador Xeon E5-2630L com dois núcleos. Logo descobri que o Ubuntu agora coloca essas configurações em /etc/apache2/mods-enabled/mpm_prefork.conf. Eu editei o MaxRequestWorkers, já que ele parecia ter a mesma descrição que MaxClients, e eu configurei para 22.

Isso pareceu resolver meus problemas de memória, pelo menos pelo que eu posso dizer. O RAM físico nunca ultrapassa 1,4 GB usado e o Swap permanece relativamente baixo. Mas agora o servidor Apache parece travar com mais freqüência, a cada 4 minutos ou mais. Antes, demoraria entre uma hora a um dia para cair.

Aqui estão os últimos registros de erros:

[Sun Dec 06 18:35:36.577144 2015] [core:error] [pid 5506] AH00046: child process 6990 still did not exit, sending a SIGKILL
[Sun Dec 06 18:35:36.577166 2015] [core:error] [pid 5506] AH00046: child process 7002 still did not exit, sending a SIGKILL
[Sun Dec 06 18:35:36.577188 2015] [core:error] [pid 5506] AH00046: child process 7004 still did not exit, sending a SIGKILL
[Sun Dec 06 18:35:36.577220 2015] [core:error] [pid 5506] AH00046: child process 7058 still did not exit, sending a SIGKILL
[Sun Dec 06 18:35:36.577250 2015] [core:error] [pid 5506] AH00046: child process 7059 still did not exit, sending a SIGKILL
[Sun Dec 06 18:35:36.577281 2015] [core:error] [pid 5506] AH00046: child process 7063 still did not exit, sending a SIGKILL
[Sun Dec 06 18:35:36.577301 2015] [core:error] [pid 5506] AH00046: child process 7118 still did not exit, sending a SIGKILL
[Sun Dec 06 18:35:36.577313 2015] [core:error] [pid 5506] AH00046: child process 7121 still did not exit, sending a SIGKILL
[Sun Dec 06 18:35:36.577326 2015] [core:error] [pid 5506] AH00046: child process 7125 still did not exit, sending a SIGKILL
[Sun Dec 06 18:35:36.577342 2015] [core:error] [pid 5506] AH00046: child process 7127 still did not exit, sending a SIGKILL
[Sun Dec 06 18:35:36.577355 2015] [core:error] [pid 5506] AH00046: child process 7130 still did not exit, sending a SIGKILL
[Sun Dec 06 18:35:36.577367 2015] [core:error] [pid 5506] AH00046: child process 7198 still did not exit, sending a SIGKILL
[Sun Dec 06 18:35:36.577388 2015] [core:error] [pid 5506] AH00046: child process 7137 still did not exit, sending a SIGKILL
[Sun Dec 06 18:35:36.577433 2015] [core:notice] [pid 5506] AH00051: child pid 7154 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 18:35:36.577450 2015] [core:error] [pid 5506] AH00046: child process 7141 still did not exit, sending a SIGKILL
[Sun Dec 06 18:35:36.577463 2015] [core:error] [pid 5506] AH00046: child process 7142 still did not exit, sending a SIGKILL
[Sun Dec 06 18:35:36.577525 2015] [core:notice] [pid 5506] AH00051: child pid 7148 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 18:35:36.577539 2015] [core:error] [pid 5506] AH00046: child process 7163 still did not exit, sending a SIGKILL
[Sun Dec 06 18:35:36.577558 2015] [core:error] [pid 5506] AH00046: child process 7164 still did not exit, sending a SIGKILL
[Sun Dec 06 18:35:36.577570 2015] [core:error] [pid 5506] AH00046: child process 7165 still did not exit, sending a SIGKILL
[Sun Dec 06 18:35:37.578868 2015] [core:notice] [pid 5506] AH00051: child pid 7191 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 18:35:37.580384 2015] [core:info] [pid 5506] AH00096: removed PID file /var/run/apache2/apache2.pid (pid=5506)
[Sun Dec 06 18:35:37.580397 2015] [mpm_prefork:notice] [pid 5506] AH00169: caught SIGTERM, shutting down
[Sun Dec 06 18:35:38.414121 2015] [mpm_prefork:notice] [pid 7583] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.14 configured -- resuming normal operations
[Sun Dec 06 18:35:38.414197 2015] [mpm_prefork:info] [pid 7583] AH00164: Server built: Oct 14 2015 14:20:21
[Sun Dec 06 18:35:38.414218 2015] [core:notice] [pid 7583] AH00094: Command line: '/usr/sbin/apache2'
[Sun Dec 06 18:35:38.414226 2015] [mpm_prefork:debug] [pid 7583] prefork.c(995): AH00165: Accept mutex: fcntl (default: sysvsem)
[Sun Dec 06 18:51:47.379529 2015] [core:info] [pid 7583] AH00096: removed PID file /var/run/apache2/apache2.pid (pid=7583)
[Sun Dec 06 18:51:47.379591 2015] [mpm_prefork:notice] [pid 7583] AH00170: caught SIGWINCH, shutting down gracefully
[Sun Dec 06 18:52:45.117602 2015] [mpm_prefork:notice] [pid 8060] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.14 configured -- resuming normal operations
[Sun Dec 06 18:52:45.117739 2015] [mpm_prefork:info] [pid 8060] AH00164: Server built: Oct 14 2015 14:20:21
[Sun Dec 06 18:52:45.117762 2015] [core:notice] [pid 8060] AH00094: Command line: '/usr/sbin/apache2'
[Sun Dec 06 18:52:45.117775 2015] [mpm_prefork:debug] [pid 8060] prefork.c(995): AH00165: Accept mutex: fcntl (default: sysvsem)
[Sun Dec 06 18:55:39.351834 2015] [mpm_prefork:error] [pid 8060] AH00161: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting
[Sun Dec 06 19:12:29.541813 2015] [core:notice] [pid 8060] AH00051: child pid 8064 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:12:29.542039 2015] [core:notice] [pid 8060] AH00051: child pid 8194 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:12:29.542131 2015] [core:notice] [pid 8060] AH00051: child pid 8066 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:12:29.542215 2015] [core:notice] [pid 8060] AH00051: child pid 8067 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:12:29.542296 2015] [core:notice] [pid 8060] AH00051: child pid 8072 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:12:29.542387 2015] [core:notice] [pid 8060] AH00051: child pid 8195 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:12:29.542469 2015] [core:notice] [pid 8060] AH00051: child pid 8075 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:12:29.542543 2015] [core:notice] [pid 8060] AH00051: child pid 8077 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:12:29.542615 2015] [core:notice] [pid 8060] AH00051: child pid 8078 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:12:29.542683 2015] [core:notice] [pid 8060] AH00051: child pid 8079 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:12:29.542756 2015] [core:notice] [pid 8060] AH00051: child pid 8199 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:12:29.542839 2015] [core:notice] [pid 8060] AH00051: child pid 8200 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:12:29.542941 2015] [core:notice] [pid 8060] AH00051: child pid 8082 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:12:29.543026 2015] [core:notice] [pid 8060] AH00051: child pid 8202 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:12:29.543108 2015] [core:notice] [pid 8060] AH00051: child pid 8218 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:12:29.543185 2015] [core:notice] [pid 8060] AH00051: child pid 8220 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:12:29.543263 2015] [core:notice] [pid 8060] AH00051: child pid 8222 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:12:29.543335 2015] [core:notice] [pid 8060] AH00051: child pid 8226 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:12:29.543406 2015] [core:notice] [pid 8060] AH00051: child pid 8227 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:12:30.544736 2015] [core:notice] [pid 8060] AH00051: child pid 8068 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:12:30.545033 2015] [core:notice] [pid 8060] AH00051: child pid 8074 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:12:30.545105 2015] [core:notice] [pid 8060] AH00051: child pid 8076 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:12:30.545205 2015] [core:info] [pid 8060] AH00096: removed PID file /var/run/apache2/apache2.pid (pid=8060)
[Sun Dec 06 19:12:30.545217 2015] [mpm_prefork:notice] [pid 8060] AH00169: caught SIGTERM, shutting down
[Sun Dec 06 19:12:31.355230 2015] [mpm_prefork:notice] [pid 13234] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.14 configured -- resuming normal operations
[Sun Dec 06 19:12:31.355315 2015] [mpm_prefork:info] [pid 13234] AH00164: Server built: Oct 14 2015 14:20:21
[Sun Dec 06 19:12:31.355330 2015] [core:notice] [pid 13234] AH00094: Command line: '/usr/sbin/apache2'
[Sun Dec 06 19:12:31.355338 2015] [mpm_prefork:debug] [pid 13234] prefork.c(995): AH00165: Accept mutex: fcntl (default: sysvsem)
[Sun Dec 06 19:16:11.659541 2015] [mpm_prefork:error] [pid 13234] AH00161: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting
[Sun Dec 06 19:20:21.604641 2015] [core:notice] [pid 13234] AH00051: child pid 14168 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:20:21.604750 2015] [core:notice] [pid 13234] AH00051: child pid 13239 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:20:21.604779 2015] [core:notice] [pid 13234] AH00051: child pid 13240 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:20:21.604810 2015] [core:notice] [pid 13234] AH00051: child pid 14174 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:20:21.604831 2015] [core:notice] [pid 13234] AH00051: child pid 13242 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:20:21.604854 2015] [core:notice] [pid 13234] AH00051: child pid 13722 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:20:21.604874 2015] [core:notice] [pid 13234] AH00051: child pid 13258 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:20:21.604894 2015] [core:notice] [pid 13234] AH00051: child pid 13435 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:20:21.604910 2015] [core:notice] [pid 13234] AH00051: child pid 13723 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:20:21.604932 2015] [core:notice] [pid 13234] AH00051: child pid 14175 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:20:21.604951 2015] [core:notice] [pid 13234] AH00051: child pid 14291 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:20:21.604970 2015] [core:notice] [pid 13234] AH00051: child pid 13732 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:20:21.604989 2015] [core:notice] [pid 13234] AH00051: child pid 13442 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:20:21.605009 2015] [core:notice] [pid 13234] AH00051: child pid 13342 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:20:21.605027 2015] [core:notice] [pid 13234] AH00051: child pid 13343 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:20:21.605045 2015] [core:notice] [pid 13234] AH00051: child pid 14183 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:20:21.605065 2015] [core:notice] [pid 13234] AH00051: child pid 13450 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:20:21.605083 2015] [core:notice] [pid 13234] AH00051: child pid 13451 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:20:21.605102 2015] [core:notice] [pid 13234] AH00051: child pid 14376 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:20:21.605120 2015] [core:notice] [pid 13234] AH00051: child pid 14186 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:20:22.606234 2015] [core:notice] [pid 13234] AH00051: child pid 13729 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:20:22.606315 2015] [core:notice] [pid 13234] AH00051: child pid 14360 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Sun Dec 06 19:20:22.606428 2015] [core:info] [pid 13234] AH00096: removed PID file /var/run/apache2/apache2.pid (pid=13234)
[Sun Dec 06 19:20:22.606436 2015] [mpm_prefork:notice] [pid 13234] AH00169: caught SIGTERM, shutting down
[Sun Dec 06 19:20:22.789597 2015] [mpm_prefork:notice] [pid 15861] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.14 configured -- resuming normal operations
[Sun Dec 06 19:20:22.789695 2015] [mpm_prefork:info] [pid 15861] AH00164: Server built: Oct 14 2015 14:20:21
[Sun Dec 06 19:20:22.789715 2015] [core:notice] [pid 15861] AH00094: Command line: '/usr/sbin/apache2'
[Sun Dec 06 19:20:22.789723 2015] [mpm_prefork:debug] [pid 15861] prefork.c(995): AH00165: Accept mutex: fcntl (default: sysvsem)
[Sun Dec 06 19:20:26.800715 2015] [mpm_prefork:info] [pid 15861] AH00162: server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 0 idle, and 12 total children
[Sun Dec 06 19:20:27.807369 2015] [mpm_prefork:info] [pid 15861] AH00162: server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 16 children, there are 0 idle, and 20 total children
[Sun Dec 06 19:20:28.810455 2015] [mpm_prefork:error] [pid 15861] AH00161: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting

O aumento da RAM no meu servidor ajudaria a resolver esse problema? Ou eu acabei de configurar o Apache incorretamente?

Obrigado antecipadamente.

    
por Andrew Greer 07.12.2015 / 01:44

0 respostas