Guten Morgen zusammen,

ich habe seit einigen Wochen einige Probleme mit meinem Apache Webserver.

Symptome:
- Alle paar Stunden schickt der Webserver keine Daten raus. Ruft man eine Seite mit Firefox auf, lädt er sich praktisch zu Tode, man kann 30 Minuten warten ohne das sich die Seite aufbaut, länger hab ich es noch nicht probiert, gehe aber davon aus, das sich nichts mehr ändert. Mit einem einfachen "rcapache graceful", also einem Neustart des Apache Servers, hab ich das ganze sofort wieder im Griff und die Seiten bauen sich wie gewohnt auf. Während des Problems tritt auf keine nennenswerte CPU-Last auf, selbst der httpd Prozess verbraucht nicht mehr als im idlen sowieso.
- Seitdem ich dieses Problem habe, beobachte ich einen Zombie-Prozess, der mir früher nie aufgefallen ist. Deshalb vermute ich, das er etwas damit zu tun hat. Solange Apache läuft zeigt mir top einen Zombie-Prozess an, bezeichnet mit "sh <defunct>". Die PID des Prozesses ändert sich ständig, so das er wohl die ganze Zeit beendet wird und sofort wieder ein neuer entsteht. Dieser Prozess frisst meist um 1% CPU-Last.

Hier einmal der Auszug von top:
Code:
top - 09:29:43 up 3 days, 13:37,  1 user,  load average: 0.01, 0.08, 0.08
Tasks:  69 total,   1 running,  67 sleeping,   0 stopped,   1 zombie
Cpu(s):  2.3% us,  1.7% sy,  0.0% ni, 96.0% id,  0.0% wa,  0.0% hi,  0.0% si
Mem:   1024004k total,   767268k used,   256736k free,   120320k buffers
Swap:  2047992k total,    28484k used,  2019508k free,   402364k cached

  PID  PPID    TIME+  %CPU %MEM  PR  NI S  VIRT SWAP  RES  UID COMMAND
12198  1579   0:00.03  1.0  0.0  24   0 Z     0    0    0    0 sh <defunct>
12124 11415   0:00.57  0.7  0.1  21   0 R  1856 1020  836    0 top
11407  2172   0:01.18  0.3  0.2  20   0 S  7384 5428 1956    0 sshd
    1     0   0:01.94  0.0  0.0  20   0 S  1556 1072  484    0 init
    2     1   0:00.00  0.0  0.0  RT   0 S     0    0    0    0 migration/0
    3     1   0:00.00  0.0  0.0  39  19 S     0    0    0    0 ksoftirqd/0
    4     1   0:00.00  0.0  0.0  15  -5 S     0    0    0    0 events/0
    5     1   0:00.00  0.0  0.0  15  -5 S     0    0    0    0 khelper
    6     1   0:00.00  0.0  0.0  15  -5 S     0    0    0    0 kthread
    8     6   0:00.00  0.0  0.0  15  -5 S     0    0    0    0 kblockd/0
   11     6   0:00.00  0.0  0.0  15  -5 S     0    0    0    0 khubd
   46     1   0:00.01  0.0  0.0  20   0 S     0    0    0    0 kapmd
  142     6   0:00.00  0.0  0.0  20   0 S     0    0    0    0 pdflush
  143     6   0:00.07  0.0  0.0  20   0 S     0    0    0    0 pdflush
  145     6   0:00.15  0.0  0.0  39  19 S     0    0    0    0 kprefetchd
  144     1   0:02.25  0.0  0.0  21   0 S     0    0    0    0 kswapd0
  146     6   0:00.00  0.0  0.0  15  -5 S     0    0    0    0 aio/0
Auf dem Server läuft noch der Kernel 2.6.14-cks5-rb1 (basiert auf 2.6.14-cks5 mit einer kleinen Schlankheitskur von mir, also selbst gebaut) mit SMP.
Den Apache hab ich nach ersten erscheinen des Problems von 2.2.0 auf 2.2.2 geupgradet (ohne Ergebnis), PHP läuft darauf in Version 5.1.4. Außerdem läuft auf dem Rechner MySQL 5.0.18, das macht mir keine Probleme.

Hier mal die Apache Config in aller Kürze:
Code:
ServerRoot "/server/bin/apache2"
<IfModule !mpm_winnt.c>
<IfModule !mpm_netware.c>
</IfModule>
</IfModule>
<IfModule !mpm_netware.c>
<IfModule !perchild.c>
</IfModule>
</IfModule>
<IfModule !mpm_netware.c>
PidFile logs/httpd.pid
</IfModule>
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule prefork.c>
StartServers         5
MinSpareServers      5
MaxSpareServers     10
MaxClients         150
MaxRequestsPerChild  0
</IfModule>
<IfModule worker.c>
StartServers         2
MaxClients         150
MinSpareThreads     25
MaxSpareThreads     75
ThreadsPerChild     25
MaxRequestsPerChild  0
</IfModule>
<IfModule perchild.c>
NumServers           5
StartThreads         5
MinSpareThreads      5
MaxSpareThreads     10
MaxThreadsPerChild  20
MaxRequestsPerChild  0
</IfModule>
Listen 80
<IfDefine SSL>
LoadModule ssl_module modules/mod_ssl.so
</IfDefine>
LoadModule dav_module modules/mod_dav.so
LoadModule php5_module        modules/libphp5.so
AddType application/x-httpd-php .leo .php
ExtendedStatus On
TransferLog "|./rotatelogs /var/log/httpd/httpd 5M"
<IfModule !mpm_winnt.c>
<IfModule !mpm_netware.c>
User httpd
Group #-1
</IfModule>
</IfModule>
ServerAdmin meinname@domain.de
UseCanonicalName Off
DocumentRoot "/server/data/intranet"
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
<Directory "/server/data/intranet">
    Options FollowSymLinks
    AllowOverride AuthConfig FileInfo
    Order deny,allow
    Deny from all
    Allow from domain.local
    Allow from 192.168.200
    Allow from 192.168.100
</Directory>
UserDir public_html
DirectoryIndex index.leo index.php index.html index.html.var
AccessFileName .htaccess
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>
TypesConfig conf/mime.types
DefaultType text/plain
<IfModule mod_mime_magic.c>
    MIMEMagicFile conf/magic
</IfModule>
HostnameLookups Off
ErrorLog logs/error_log
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combine                                                                              d
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog logs/access_log common
ServerTokens Full
ServerSignature EMail
Alias /icons/ "/server/bin/apache2/icons/"
<Directory "/server/bin/apache2/icons">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|ru))?(/.*)?$ "/server/bin/apache2/ma                                                                              nual$1"
<Directory "/server/bin/apache2/manual">
    Options Indexes
    AllowOverride None
    Order allow,deny
    Allow from all
    <Files *.html>
        SetHandler type-map
    </Files>
    SetEnvIf Request_URI ^/manual/de/ prefer-language=de
    SetEnvIf Request_URI ^/manual/en/ prefer-language=en
    SetEnvIf Request_URI ^/manual/es/ prefer-language=es
    SetEnvIf Request_URI ^/manual/fr/ prefer-language=fr
    SetEnvIf Request_URI ^/manual/ja/ prefer-language=ja
    SetEnvIf Request_URI ^/manual/ko/ prefer-language=ko
    SetEnvIf Request_URI ^/manual/ru/ prefer-language=ru
    RedirectMatch 301 ^/manual(?:/(de|en|es|fr|ja|ko|ru)){2,}(/.*)?$ /manual/$1$                                                                              2
</Directory>
ScriptAlias /cgi-bin/ "/server/bin/apache2/cgi-bin/"
<IfModule mod_cgid.c>
</IfModule>
<Directory "/server/bin/apache2/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>
AddLanguage ca .ca
AddLanguage cs .cz .cs
AddLanguage da .dk
AddLanguage de .de
AddLanguage el .el
AddLanguage en .en
AddLanguage eo .eo
AddLanguage es .es
AddLanguage et .et
AddLanguage fr .fr
AddLanguage he .he
AddLanguage hr .hr
AddLanguage it .it
AddLanguage ja .ja
AddLanguage ko .ko
AddLanguage ltz .ltz
AddLanguage nl .nl
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddLanguage pt .pt
AddLanguage pt-BR .pt-br
AddLanguage ru .ru
AddLanguage sv .sv
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw
LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt                                                                               pt-BR ru sv zh-CN zh-TW
ForceLanguagePriority Prefer Fallback
AddDefaultCharset ISO-8859-1
AddCharset ISO-8859-1  .iso8859-1  .latin1
AddCharset ISO-8859-2  .iso8859-2  .latin2 .cen
AddCharset ISO-8859-3  .iso8859-3  .latin3
AddCharset ISO-8859-4  .iso8859-4  .latin4
AddCharset ISO-8859-5  .iso8859-5  .latin5 .cyr .iso-ru
AddCharset ISO-8859-6  .iso8859-6  .latin6 .arb
AddCharset ISO-8859-7  .iso8859-7  .latin7 .grk
AddCharset ISO-8859-8  .iso8859-8  .latin8 .heb
AddCharset ISO-8859-9  .iso8859-9  .latin9 .trk
AddCharset ISO-2022-JP .iso2022-jp .jis
AddCharset ISO-2022-KR .iso2022-kr .kis
AddCharset ISO-2022-CN .iso2022-cn .cis
AddCharset Big5        .Big5       .big5
AddCharset WINDOWS-1251 .cp-1251   .win-1251
AddCharset CP866       .cp866
AddCharset KOI8-r      .koi8-r .koi8-ru
AddCharset KOI8-ru     .koi8-uk .ua
AddCharset ISO-10646-UCS-2 .ucs2
AddCharset ISO-10646-UCS-4 .ucs4
AddCharset UTF-8       .utf8
AddCharset GB2312      .gb2312 .gb
AddCharset utf-7       .utf7
AddCharset utf-8       .utf8
AddCharset big5        .big5 .b5
AddCharset EUC-TW      .euc-tw
AddCharset EUC-JP      .euc-jp
AddCharset EUC-KR      .euc-kr
AddCharset shift_jis   .sjis
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddHandler type-map var
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-caref                                                                              ully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
BrowserMatch "^gnome-vfs" redirect-carefully
<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from All
    Allow from localhost
    Allow from 192.168.200.101
    Allow from intranet
    Allow from intranet.domain.local
    Allow from .domain.local
</Location>
<IfModule mod_ssl.c>
    Include conf/ssl.conf
</IfModule>
Was mich vor allem interessiert ist, ob diese ganzen Zombie-Prozesse normal sind. Und wie ich das "Stocken" des Webservers loswerde, ohne "rcapache graceful" alle 30 Minuten ausführen zu lassen.
Vermutlich wird die Frage kommen, was ich geändert habe, als das Problem begann: Das Problem ist: Gar nichts, in den letzten Monaten hab ich nur an der PHP Software ein paar Korrekturen vorgenommen. Die Serversoftware selbst hab ich erst nach dem ersten auftreten des Problemes geupgradet.

Für Hinweise wäre ich sehr dankbar!

Mit freundlichen Grüßen,
- ZoolWay