wwwrun frisst speicher -> load schießt nach oben

Apache, Lighttpd, nginx, Cherokee
User avatar
andy-stoltze
Posts: 38
Joined: 2013-01-31 20:12

wwwrun frisst speicher -> load schießt nach oben

Post by andy-stoltze »

Hallo,
im topic http://www.rootforum.org/forum/viewtopi ... 00&t=54150 habe ich das Problem schon mal beschrieben.
Jetzt weiß ich, dass wwwrun das Problem verursacht.
Einer von ca. 20 wwwrun (/usr/sbin/httpd2-prefork) Prozessen verbraucht innerhalb von sekunden immer mehr speicher dann schießt der load auf 80-90
die fcgi (/usr/bin/php-cgi5) Prozesse bleiben alle im grünen Bereich.
die access.log bringt mich auch nicht weiter.
gibt es eine möglichkeit herauszufinden welcher Account das verursacht bzw. das verbrauchen von so viel ram zu unterbinden?

meine server-tuning.conf sieht wie folgt aus:

Code: Select all

##
## 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
	# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#startservers
	StartServers         5
	# minimum number of server processes which are kept spare
	# http://httpd.apache.org/docs/2.2/mod/prefork.html#minspareservers
	MinSpareServers      5
	# maximum number of server processes which are kept spare
	# http://httpd.apache.org/docs/2.2/mod/prefork.html#maxspareservers
	MaxSpareServers     10
	# highest possible MaxClients setting for the lifetime of the Apache process.
	# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#serverlimit
	ServerLimit        150
	# maximum number of server processes allowed to start
	# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxclients
	MaxClients         150
	# maximum number of requests a server process serves
	# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxrequestsperchild
	MaxRequestsPerChild  1000
</IfModule>

# worker MPM
<IfModule worker.c>
	# initial number of server processes to start
	# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#startservers
	StartServers         3
	# minimum number of worker threads which are kept spare
	# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#minsparethreads
	MinSpareThreads     25
	# maximum number of worker threads which are kept spare
	# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxsparethreads
	MaxSpareThreads     75 
	# upper limit on the configurable number of threads per child process
	# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#threadlimit
	ThreadLimit         64
	# maximum number of simultaneous client connections
	# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxclients
	MaxClients         150
	# number of worker threads created by each child process
	# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#threadsperchild
	ThreadsPerChild     25
	# maximum number of requests a server process serves
	# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxrequestsperchild
	MaxRequestsPerChild  1000
</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 1

#
# MaxRanges: Maximum number of Ranges in a request before
# returning the entire resource, or one of the special
# values 'default', 'none' or 'unlimited'.
# Default setting is to accept 200 Ranges.
#MaxRanges unlimited

#
# EnableMMAP: Control whether memory-mapping is used to deliver
# files (assuming that the underlying OS supports it).
# The default is on; turn this off if you serve from NFS-mounted
# filesystems.  On some systems, turning it off (regardless of
# filesystem) can improve performance; for details, please see
# http://httpd.apache.org/docs-2.2/mod/core.html#enablemmap
#
#EnableMMAP off

#
# EnableSendfile: Control whether the sendfile kernel support is
# used  to deliver files (assuming that the OS supports it).
# The default is on; turn this off if you serve from NFS-mounted
# filesystems.  Please see
# http://httpd.apache.org/docs-2.2/mod/core.html#enablesendfile
#
#EnableSendfile off

<IfModule mod_setenvif.c>
	#
	# 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
</IfModule>

hjt
Posts: 24
Joined: 2003-06-04 15:53

Re: wwwrun frisst speicher -> load schießt nach oben

Post by hjt »

Hallo,

vielleicht siehst du ja was im server-status, wenn du ExtendedStatus auf "On" stellst:

http://httpd.apache.org/docs/2.2/mod/mod_status.html

mfg
hjt

User avatar
andy-stoltze
Posts: 38
Joined: 2013-01-31 20:12

Re: wwwrun frisst speicher -> load schießt nach oben

Post by andy-stoltze »

gute idee. danke