httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomasz Chmielewski <>
Subject Re: [users@httpd] preforked processes don't want to die over time -> memory full
Date Mon, 02 Mar 2009 15:02:51 GMT
Tomasz Chmielewski schrieb:
> 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.

My issue looks very similar to the one described (and not solved) here:

In short, stracing a httpd process stops on LOCK_EX:

$ strace -p 3230

0600) = 44
06:57:12 flock(44, LOCK_EX

And "lsof" shows that such session files are being accessed by many 
httpd processes (each wanting to have an exclusive lock, which will 
block all other instances).

Hmm, what should I do?

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