httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomasz Chmielewski <>
Subject [users@httpd] preforked processes don't want to die over time -> memory full
Date Sat, 28 Feb 2009 14:37:39 GMT
I have Apache 2.2.3 server, which over time (a couple of days) uses lots 
of memory. What uses lots of memory? Apache processes which do not want 
to die for some reason.

The server can have only 10-20 active connections to httpd (as reported 
by netstat's ESTABLISHED), but in the same time, there can be 80, 100, 
120 or more httpd processes (the longer httpd was not restarted, the 
more httpd processes will run, till memory and swap are full and 
OOM-killer will start to kill processes).

Short term, httpd processes are created and killed (exit), but longer 
term, after several hours, I can see that more and more httpd processes 
are running.

How can I trace what causes this misbehaviour? Perhaps it's some PHP 
code which never exits.
I always used strace to check various malfunctioning, but I think it'd 
be an overkill here, and perhaps there is a better way to check what 
httpd processes were doing and how long did it take them.

It is prefork with pretty default settings:

MaxKeepAliveRequests 100
KeepAliveTimeout 15

<IfModule prefork.c>
StartServers       8
MinSpareServers    5
MaxSpareServers   20
ServerLimit      256
MaxClients       256
MaxRequestsPerChild  4000

Apache comes from httpd-2.2.3-11.el5_2.centos.4 package from CentOS 5.2.

Tomasz Chmielewski

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message