Bug#485413: apache2/lenny/amd64 eats up all RAM
On Mon, 15 Aug 2011, Stefan Fritsch wrote:
> - How much memory does your machine have, how much is actually
> available for apache (i.e. not used by other processes).
This one has 12 GiB in total. Memory is mostly shared between
Apache, Sonar (Jenkins Plugin) and Jenkins. Normally, Apache
has 11 processes, each using less than 5 MiB (ps ax -O rss).
> - Which MPM do you use?
ii apache2-mpm-prefork 2.2.9-10+lenny9.0tarent1 Apache HTTP Server - traditional non-threade
> - What are your settings for StartServers, MaxRequestsPerChild,
> ThreadsPerChild, MinSpareThreads/MinSpareServers,
> MaxSpareThreads/MaxSpareServers
Used to be the defaults. When the problems started, I tried
tweaking to these (no success):
/etc/apache2/apache2.conf: StartServers 5
/etc/apache2/apache2.conf: MinSpareServers 5
/etc/apache2/apache2.conf: MaxSpareServers 10
/etc/apache2/apache2.conf: MaxRequestsPerChild 3000
On another box, I have these:
/etc/apache2/apache2.conf: StartServers 5
/etc/apache2/apache2.conf: MinSpareServers 5
/etc/apache2/apache2.conf: MaxSpareServers 10
/etc/apache2/apache2.conf: MaxRequestsPerChild 20
/etc/apache2/apache2.conf:MaxMemFree 512
Will monitor whether it occurs there, too – a bit futile
since we know of nothing to trigger the problem, it just
happens every once in a while.
> - How large do the apache2 processes grow? (RSS) How quickly do they
> grow?
As could be seen, they eat up _all_ available RAM and swap.
This happens very quickly because we usually notice the
problem because Jenkins is terminated by the OOM Kernel
thing when Apache grows; Jenkins is in use by our developers,
so this occurs suddenly.
> - How many apache2 are running during normal operation?
Eleven, as seen above.
> If that doesn't help, try setting 'MaxMemFree 4'. If that doesn't help
> enough, add 'export MALLOC_MMAP_THRESHOLD_=8000' to
> /etc/apache2/envvars (the trailing underscore is not a typo). These
> options lower performance, though.
Will do. First thing is lowering MaxRequestsPerChild for
all our Jenkins instances, I’d say.
> Please report back about the results.
OK. Thanks!
bye,
//mirabilos
--
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 52675-25
HRB AG Bonn 5168 • USt-ID (VAT): DE122264941
Geschäftsführer: Boris Esser, Elmar Geese
Reply to: