Permalänk

Apache2, PHP problem

Hej,

Jag har lite problem med en webserver som slutar fungera med oregelbundna mellanrum. Tänkte höra om någon här har sett något liknande tidigare.

Urklipp ut /var/apache2/error.log

[Sun May 18 06:41:56.139844 2014] [mpm_prefork:notice] [pid 1180] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4 configured -- resuming normal operations
[Sun May 18 06:41:56.139893 2014] [core:notice] [pid 1180] AH00094: Command line: '/usr/sbin/apache2'
[Mon May 19 23:01:07.432463 2014] [mpm_prefork:error] [pid 1180] AH00161: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting
[Wed May 21 08:37:56.348614 2014] [core:notice] [pid 1180] AH00052: child pid 6697 exit signal Segmentation fault (11)
[Wed May 21 08:37:57.579226 2014] [core:notice] [pid 1180] AH00052: child pid 6585 exit signal Segmentation fault (11)
[Wed May 21 08:37:57.602184 2014] [core:notice] [pid 1180] AH00052: child pid 6761 exit signal Segmentation fault (11)
[Wed May 21 08:37:57.602289 2014] [core:notice] [pid 1180] AH00052: child pid 6746 exit signal Segmentation fault (11)
[Wed May 21 08:37:57.602389 2014] [core:notice] [pid 1180] AH00052: child pid 7670 exit signal Segmentation fault (11)
[Wed May 21 08:37:57.602482 2014] [core:notice] [pid 1180] AH00052: child pid 6772 exit signal Segmentation fault (11)
[Wed May 21 08:37:57.602600 2014] [core:notice] [pid 1180] AH00052: child pid 6808 exit signal Segmentation fault (11)
[Wed May 21 08:37:57.602710 2014] [core:notice] [pid 1180] AH00052: child pid 9354 exit signal Segmentation fault (11)
[Wed May 21 08:37:57.602823 2014] [core:notice] [pid 1180] AH00052: child pid 9014 exit signal Segmentation fault (11)
[Wed May 21 08:38:04.858533 2014] [core:error] [pid 1180] AH00046: child process 3808 still did not exit, sending a SIGKILL
[Wed May 21 08:38:04.858541 2014] [core:error] [pid 1180] AH00046: child process 3870 still did not exit, sending a SIGKILL
[Wed May 21 08:38:04.858549 2014] [core:error] [pid 1180] AH00046: child process 3531 still did not exit, sending a SIGKILL
[Wed May 21 08:38:04.858557 2014] [core:error] [pid 1180] AH00046: child process 3907 still did not exit, sending a SIGKILL
[Wed May 21 08:38:04.858632 2014] [core:notice] [pid 1180] AH00052: child pid 3922 exit signal Segmentation fault (11)
[Wed May 21 08:38:04.858641 2014] [core:error] [pid 1180] AH00046: child process 3926 still did not exit, sending a SIGKILL
[Wed May 21 08:38:04.858649 2014] [core:error] [pid 1180] AH00046: child process 3947 still did not exit, sending a SIGKILL
[Wed May 21 08:38:04.858824 2014] [core:error] [pid 1180] AH00046: child process 9400 still did not exit, sending a SIGKILL
[Wed May 21 08:38:04.858832 2014] [core:error] [pid 1180] AH00046: child process 9401 still did not exit, sending a SIGKILL
[Wed May 21 08:38:04.858841 2014] [core:error] [pid 1180] AH00046: child process 9430 still did not exit, sending a SIGKILL
[Wed May 21 08:38:04.858849 2014] [core:error] [pid 1180] AH00046: child process 9432 still did not exit, sending a SIGKILL
[Wed May 21 08:38:05.861136 2014] [core:notice] [pid 1180] AH00052: child pid 3828 exit signal Segmentation fault (11)
[Wed May 21 08:38:05.862296 2014] [core:notice] [pid 1180] AH00052: child pid 7587 exit signal Segmentation fault (11)
[Wed May 21 08:38:05.862368 2014] [core:notice] [pid 1180] AH00052: child pid 6718 exit signal Segmentation fault (11)
[Wed May 21 08:38:05.862641 2014] [core:notice] [pid 1180] AH00052: child pid 9400 exit signal Segmentation fault (11)
[Wed May 21 08:38:05.862865 2014] [core:notice] [pid 1180] AH00052: child pid 9432 exit signal Segmentation fault (11)
[Wed May 21 08:38:05.862989 2014] [mpm_prefork:notice] [pid 1180] AH00169: caught SIGTERM, shutting down
[Wed May 21 08:46:40.343301 2014] [mpm_prefork:notice] [pid 1167] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4 configured -- resuming normal operations
[Wed May 21 08:46:40.362777 2014] [core:notice] [pid 1167] AH00094: Command line: '/usr/sbin/apache2'
[Wed May 21 09:48:47.859697 2014] [mpm_prefork:notice] [pid 1167] AH00169: caught SIGTERM, shutting down
[Wed May 21 09:57:39.577436 2014] [mpm_prefork:notice] [pid 1188] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4 configured -- resuming normal operations
[Wed May 21 09:57:39.610659 2014] [core:notice] [pid 1188] AH00094: Command line: '/usr/sbin/apache2'

Tacksam för hjälp.

Server information:
user@vevs12:~$ apache2 -v
Server version: Apache/2.4.7 (Ubuntu)
Server built: Apr 3 2014 12:20:28
user@vevs12:~$ php -v
PHP 5.5.9-1ubuntu4 (cli) (built: Apr 9 2014 17:11:57)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies

Permalänk
Medlem

På måndagen fick du slut på tillgängliga arbetartrådar och jag antar att du startade om apache på onsdagen vilket resulterar i att ett antal trådar dör med minnesfel vilket kan tyda på att dom fastnat och det är skälet till att du fått slut på arbetartrådar men det kan även vara ett tecken på att du fått slut på andra resurser.

Permalänk
Skrivet av aluser:

På måndagen fick du slut på tillgängliga arbetartrådar och jag antar att du startade om apache på onsdagen vilket resulterar i att ett antal trådar dör med minnesfel vilket kan tyda på att dom fastnat och det är skälet till att du fått slut på arbetartrådar men det kan även vara ett tecken på att du fått slut på andra resurser.

Ja, det stämmer, jag startade om den idag. Så ett Segmantation fault är när en tråd dör med minnesfel?

Jag har försökt hitta var jag ändrar MaxRequestWorkers,, men hittar det inte. Har inte det "alternativet" i varken httpd.con eller apache2.conf

Permalänk

Efter lite googlande så hittade jag ett förlag att man skulle köra gdb och backtrace på den.

Så här är min output från det, och så hoppas jag på lite mer hjälp.

(gdb) attach 1536
Attaching to process 1536
Reading symbols from /bin/bash...(no debugging symbols found)...done.
Reading symbols from /lib/x86_64-linux-gnu/libtinfo.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libtinfo.so.5
Reading symbols from /lib/x86_64-linux-gnu/libdl.so.2...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libdl-2.19.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libdl.so.2
Reading symbols from /lib/x86_64-linux-gnu/libc.so.6...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libc-2.19.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/ld-2.19.so...done.
done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib/x86_64-linux-gnu/libnss_compat.so.2...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libnss_compat-2.19.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libnss_compat.so.2
Reading symbols from /lib/x86_64-linux-gnu/libnsl.so.1...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libnsl-2.19.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libnsl.so.1
Reading symbols from /lib/x86_64-linux-gnu/libnss_nis.so.2...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libnss_nis-2.19.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libnss_nis.so.2
Reading symbols from /lib/x86_64-linux-gnu/libnss_files.so.2...Reading symbols from /usr/lib/debug//lib/x86_64-linux-gnu/libnss_files-2.19.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libnss_files.so.2
0x00007f97081a998c in __libc_waitpid (pid=-1, stat_loc=0x7fffd1c7ffb8, options=10) at ../sysdeps/unix/sysv/linux/waitpid.c:31
31 ../sysdeps/unix/sysv/linux/waitpid.c: No such file or directory.
(gdb) c
Continuing.
^C
Program received signal SIGINT, Interrupt.
0x00007f97081a998c in __libc_waitpid (pid=-1, stat_loc=0x7fffd1c7ffb8, options=10) at ../sysdeps/unix/sysv/linux/waitpid.c:31
31 in ../sysdeps/unix/sysv/linux/waitpid.c
(gdb) backtrace
#0 0x00007f97081a998c in __libc_waitpid (pid=-1, stat_loc=0x7fffd1c7ffb8, options=10) at ../sysdeps/unix/sysv/linux/waitpid.c:31
#1 0x0000000000445956 in ?? ()
#2 0x0000000000446c3b in wait_for ()
#3 0x00000000004377eb in execute_command_internal ()
#4 0x000000000043784e in execute_command ()
#5 0x00000000004211ee in reader_loop ()
#6 0x000000000041f729 in main ()
(gdb) backtrace full
#0 0x00007f97081a998c in __libc_waitpid (pid=-1, stat_loc=0x7fffd1c7ffb8, options=10) at ../sysdeps/unix/sysv/linux/waitpid.c:31
resultvar = 18446744073709551104
oldtype = 16336904
#1 0x0000000000445956 in ?? ()
No symbol table info available.
#2 0x0000000000446c3b in wait_for ()
No symbol table info available.
#3 0x00000000004377eb in execute_command_internal ()
No symbol table info available.
#4 0x000000000043784e in execute_command ()
No symbol table info available.
#5 0x00000000004211ee in reader_loop ()
No symbol table info available.
#6 0x000000000041f729 in main ()
No symbol table info available.
(gdb)

/Peter