Apache2 "afvallig" child geeft 503 melding

Pagina: 1
Acties:

  • Robert
  • Registratie: Juni 2000
  • Laatst online: 08:08

Robert

You have your answer..

Topicstarter
Ik heb hier een redelijk "standaard" lamp webserver met veel websites erop, die al lange tijd stabiel draait. Draait momenteel nog op Debian Etch (soon to be Lenny), en apache 2.2.3-4+etch6.

Sinds enige tijd merk ik echter dat op sommige dagen de apache server soms een 503 melding geeft aan bezoekers. Een restart van apache2 verhelpt het probleem, maar dat treed vaak 1 of meerdere dagen later weer op.

Als ik de proceslist op zo'n moment bekijk zie ik ook 1 of meerdere apache processen die niet onder master lijken te vallen en "half" geladen lijken te zijn (met lsof blijkt dat ze wel sommige files wel geopend zijn, maar heel veel andere normale apache files niet). Killen van dat proces of processen verhelpt het probleem ook, dus dat is welhaast zeker het probleem.

Ik heb nu voor de tweede keer met lsof gekeken, en het lijkt alsof ik het probleem kan terugleiden tot een editor op 1 of andere website (die komt nl. wederom terug in de open files van dat proces). Het lijkt me echter dat bugs in PHP code niet voor zo'n (ernstig) probleem in Apache2 kunnen zorgen. Kon ook niet direct iets raars zien in die editor, maar ben uiteraard niet regel voor regel daar doorheen gegaan. Iemand eerder soortgelijk gedrag gezien, of een idee hoe ik er verder kan achter komen?

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#lsof -p 22094|grep -v .log:
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
dse84abzw 22094 www-data cwd DIR 8,1 4096 1540457 /home/user/website.nl/www/cms/editor
dse84abzw 22094 www-data rtd DIR 8,1 16384 2 /
dse84abzw 22094 www-data txt REG 8,1 17263 6751996 /home/user/website.nl/www/cms/editor/dse84abzw1abzw1abzw1abzw1abzw1abzw1a (deleted)
dse84abzw 22094 www-data mem REG 0,0 0 [heap] (stat: No such file or directory)
dse84abzw 22094 www-data mem REG 8,1 67364 1339634 /lib/tls/i686/cmov/libresolv-2.3.6.so
dse84abzw 22094 www-data mem REG 8,1 17840 1339627 /lib/tls/i686/cmov/libnss_dns-2.3.6.so
dse84abzw 22094 www-data mem REG 8,1 38372 1339628 /lib/tls/i686/cmov/libnss_files-2.3.6.so
dse84abzw 22094 www-data mem REG 8,1 1241392 1339549 /lib/tls/i686/cmov/libc-2.3.6.so
dse84abzw 22094 www-data mem REG 8,1 88164 1344103 /lib/ld-2.3.6.so
dse84abzw 22094 www-data 0u IPv6 156309376 TCP *:www (LISTEN)
dse84abzw 22094 www-data 3u IPv6 156309376 TCP *:www (LISTEN)
dse84abzw 22094 www-data 4u sock 0,5 156309377 can't identify protocol
dse84abzw 22094 www-data 5u IPv6 156309381 TCP *:https (LISTEN)
dse84abzw 22094 www-data 6u sock 0,5 156309382 can't identify protocol
dse84abzw 22094 www-data 9r FIFO 0,6 156309471 pipe
dse84abzw 22094 www-data 10w FIFO 0,6 156309471 pipe
dse84abzw 22094 www-data 147w REG 8,1 0 5144643 /var/run/apache2/ssl_mutex (deleted)
dse84abzw 22094 www-data 148u REG 8,1 0 819270 /tmp/ZCUDEhUHmr (deleted)
dse84abzw 22094 www-data 149u sock 0,5 156614578 can't identify protocol

strace -p 22094
root@mrorange:~# strace -p 22094
Process 22094 attached - interrupt to quit
restart_syscall(<... resuming interrupted call ...>) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
fcntl64(0, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
rt_sigaction(SIGALRM, {0x8048d98, [ALRM], SA_RESTART}, {0x8048d98, [ALRM], SA_RESTART}, 8) = 0
alarm(120) = 90
select(1, [0], NULL, NULL, NULL) = 1 (in [0])
accept(0, 0xbfbec79c, [16]) = -1 EAGAIN (Resource temporarily unavailable)
fcntl64(0, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
rt_sigaction(SIGALRM, {0x8048d98, [ALRM], SA_RESTART}, {0x8048d98, [ALRM], SA_RESTART}, 8) = 0
alarm(120) = 113
select(1, [0], NULL, NULL, NULL) = 1 (in [0])
accept(0, 0xbfbec79c, [16]) = -1 EAGAIN (Resource temporarily unavailable)
fcntl64(0, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
rt_sigaction(SIGALRM, {0x8048d98, [ALRM], SA_RESTART}, {0x8048d98, [ALRM], SA_RESTART}, 8) = 0
alarm(120) = 120
select(1, [0], NULL, NULL, NULL) = 1 (in [0])
accept(0, 0xbfbec79c, [16]) = -1 EAGAIN (Resource temporarily unavailable)

Just 'cause I'm paranoid doesn't mean they're not after me | The only operating system that does what you want: LFS