PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Apache macht Probleme (zu viele Prozesse)



oschie
20.06.05, 13:28
Hi Leute,

ich habe ziemlich viele "httpd2-prefork"-Prozesse geöffnet, wenn ich "top" aufrufe.

Nach einem Server-Neustart gibts immer mehr "httpd2-prefork"-Prozesse, die die CPU auf 100% auslasten. Ich hab mal ein Screenshot davon eingefügt...

Meine Server hat nicht so viele http-Zugriffe, dass der Prozess so oft gestartet werden müsste. (ca. 2000 uniquehits am Tag bzw. seit dem Fehler immer weniger, da der Server ziemlich überlastet ist)

Hat jemand eine Lösung parat, warum das ganze von heut auf morgen so seltsam ist?
Bei Bedarf kann ich auch mehr Infos posten. Die Apache Einstellungen sind alle auf default (Confixx-Einstellungen).

-> Apache/2.0.49 (Linux/SuSE)
-> Confixx 3.0 Pro
-> Suse 9.2


Gruß
oschie

Herr Kommisar
20.06.05, 13:35
steht was in den logfiles


manchmal liegt der Schlüssel zum Erfolg in den Logfiles

marce
20.06.05, 13:40
poste doch mal die httpd.conf (aber bitte in code-Tags)

Tomek
20.06.05, 15:09
Bitte lesen: http://httpd.apache.org/docs-2.0/de/mod/prefork.html

oschie
20.06.05, 15:13
Wie gesagt, es läuft Confixx - sprich die httpd.conf ist unterteilt in mehrere Konfigurationsdateien.

Hier die wohl Interessanteste aus eurer sicht: /etc/apache2/server-tuning.conf


##
## Server-Pool Size Regulation (MPM specific)
##

# the MPM (multiprocessing module) is not a dynamically loadable module in the
# sense of other modules. It is a compile time decision which one is used. We
# provide different apache2 MPM packages, containing different httpd2 binaries
# compiled with the available MPMs. See APACHE_MPM in /etc/sysconfig/apache2.

# prefork MPM
<IfModule prefork.c>
# number of server processes to start
StartServers 5
# minimum number of server processes which are kept spare
MinSpareServers 5
# maximum number of server processes which are kept spare
MaxSpareServers 10
# highest possible MaxClients setting for the lifetime of the Apache process.
ServerLimit 150
# maximum number of server processes allowed to start
MaxClients 150
# maximum number of requests a server process serves
MaxRequestsPerChild 0
</IfModule>

# worker MPM
<IfModule worker.c>
# initial number of server processes to start
StartServers 2
# minimum number of worker threads which are kept spare
MinSpareThreads 25
# maximum number of worker threads which are kept spare
MaxSpareThreads 75
# maximum number of simultaneous client connections
MaxClients 150
# constant number of worker threads in each server process
ThreadsPerChild 25
# maximum number of requests a server process serves
MaxRequestsPerChild 0
</IfModule>

# leader MPM
<IfModule leader.c>
# initial number of server processes to start
StartServers 2
# minimum number of worker threads which are kept spare
MinSpareThreads 25
# maximum number of worker threads which are kept spare
MaxSpareThreads 75
# maximum number of simultaneous client connections
MaxClients 150
# constant number of worker threads in each server process
ThreadsPerChild 25
# maximum number of requests a server process serves
MaxRequestsPerChild 0
</IfModule>

# perchild MPM
<IfModule perchild.c>
# constant number of server processes
NumServers 5
# initial number of worker threads in each server process
StartThreads 5
# minimum number of worker threads which are kept spare
MinSpareThreads 5
# maximum number of worker threads which are kept spare
MaxSpareThreads 10
# maximum number of worker threads in each server process
MaxThreadsPerChild 20
# maximum number of connections per server process
MaxRequestsPerChild 0

AcceptMutex fcntl
</IfModule>

# metux MPM
<IfModule metuxmpm.c>
# initial number of worker threads in each server process
StartThreads 5
# minimum number of worker threads which are kept spare
MinSpareThreads 5
# maximum number of worker threads which are kept spare
MaxSpareThreads 10
# maximum number of connections per server process
MaxRequestsPerChild 0

Multiplexer "wwwrun" "www"

</IfModule>


#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15

#
# The following directives modify normal HTTP response behavior to
# handle known problems with browser implementations.
#
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

#
# The following directive disables redirects on non-GET requests for
# a directory that does not include the trailing slash. This fixes a
# problem with Microsoft WebFolders which does not appropriately handle
# redirects for folders with DAV methods.
# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
#
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
BrowserMatch "^gnome-vfs" redirect-carefully


wenn ich den apache neustarte, so erscheint folgendes in der der/var/log/apache2/error_log. in mehracher ausführung für wohl jeden httpd2-prefork prozess:


[Mon Jun 20 16:01:21 2005] [warn] child process 18238 still did not exit, sending a SIGTERM
[Mon Jun 20 16:01:25 2005] [error] child process 18300 still did not exit, sending a SIGKILL


Gruß
oschie

oschie
21.06.05, 06:27
keine ideen?!? :(

marce
21.06.05, 06:36
die Conf sieht eigentlich gut aus - was sind denn das für Dateien, die dort abgerufen werden? Selbst-programmierte Scripte oder reines HTML? Passiert das auch wenn an dem Server kein Netz vorhanden ist?

Kann auch einfach ein popeliger DOS sein - Logfileanalyse und Code-Audith wäre jetzt wohl angesagt...

Tomek
21.06.05, 08:49
Bitte lesen: http://httpd.apache.org/docs-2.0/de/mod/prefork.html
Das hast du vermutlich nicht getan, richtig?

oschie
21.06.05, 10:59
Danke vielmals!