PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : apachectl graceful - viele httpd-Prozesse



mox
19.07.09, 19:15
Hallo zusammen,

auf einen Webserver läuft eine Seite mit apache/mysql.

Das Problem ist, das die Anzahl der in der "ps awx" -Prozessliste
sichtbaren Apache-Prozesse ständig ansteigt,
bis um Apache-max-connections herum gependelt wird.

Nach einem "apachectl graceful" löst sich der Spuk ca. 5 Sekunden
später jedoch auf und es sind nur noch wenige Apache-Prozesse sichtbar
und die Sache geht von neuem los.

Setze ich keinen "apachectl graceful" ab, schwankt die hohe Anzahl
der in der Prozessliste sichtbaren Apache-Verbindungen weiter um max-connection.

Wie kann das sein, denn ein "apachectl graceful" killt ja nach meiner Kenntnis keine bestehenden Anfragen, sondern arbeitet alle ab.

Und wenn der Apache alle Abfragen abarbeitet, dann müsste es doch
eigentlich auch ohne "apachectl graceful" vernünftig laufen.

Hat jemand eine Idee ?

marce
20.07.09, 09:33
poste mal die relevanten Teile der Konfig.

DrunkenFreak
20.07.09, 16:40
Vielleicht ist das Skript mist und es landet in einer Schleife

so long

mox
20.07.09, 19:27
# selbst wenn das Script Mist ist, wieso beendet "apache graceful"
mögliche Endlos- oder lange Schleifen ?

Die wichtigsten Teile der Konfig. Weiß nicht genau was wichtig ist,
aber soviel wurde da nicht geändert:



# DATEI httpd.conf Apache 2.2

ServerRoot "/usr/local/apache2"
Listen 80

LoadModule authz_host_module modules/mod_authz_host.so
LoadModule php5_module modules/libphp5.so

<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>
User wwwrun
Group www
</IfModule>
</IfModule>

<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>

<IfModule dir_module>
DirectoryIndex index.php index.html
</IfModule>

<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>

ErrorLog "logs/error_log"
LogLevel warn

<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %P PID=%P Time=%T" mylogformat
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common

<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>

CustomLog "logs/access_log" common
</IfModule>

<IfModule alias_module>
ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
</IfModule>

<IfModule cgid_module>
</IfModule>

<Directory "/usr/local/apache2/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

DefaultType text/plain

<IfModule mime_module>
TypesConfig conf/mime.types

AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php
</IfModule>

Include conf/extra/httpd-vhosts.conf

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>




# DATEI conf/extra/httpd-vhosts.conf
NameVirtualHost *:80

<VirtualHost *:80>
ServerName xxx.xxx.de
DocumentRoot /srv/www/mydir/htdocs/
<Directory /srv/www/mydir/htdocs/>
Options -Indexes +FollowSymLinks -MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog logs/my-error_log
CustomLog logs/my-access_log mylogformat
</VirtualHost>

marce
20.07.09, 23:09
wo ist denn die Definition für das MPM? Das meinte ich mit "relevant" :-)

mox
21.07.09, 17:46
die "extra/httpd-mpm.conf" ist gar nicht eingebunden,
ich nehme an, dann werden Default-Werte genutzt,
der Apache läuft als prefork.