You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Roger Harrell <ro...@audiblefaith.com> on 2005/01/10 18:38:59 UTC

[users@httpd] mod_status usage, identifying memory leaks

I've been trying to track down the cause of excessive RAM usage for some 
time. I've tried mod_status, but it does not seem to yield the info I 
need. I get a list of current requests associated with the PIDs, but 
those current requests are not necessarily the request causing the problem.

example. I've got 12 Apache child processes. 4 of which are occupying 
14% of server RAM. This is excessive. So I use mod_status to try and 
identify why this is happening. All mod_status tells  me (with extended 
status on) is one current request each of these children is serving. In 
each case they are serving pages utilizing different scripts, so it has 
not given any information on which script might be the culprit. How can 
I further isolate the problem?

Thanks,
-- 
Roger


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_status usage, identifying memory leaks

Posted by Roger Harrell <ro...@audiblefaith.com>.
> Well, that's the thing. It does not happen frequently. It will occur
>> over a 3 hour period once a week or so. There does not seem to be any
>> unusual patterns in access_log. This is a pretty high traffic site
>> (5,000+ visitors per day) so it's tough to isolate anything in the log
>> files.
> 
> 
> There are no magic tricks here.  It would be nice if it was possible
> for apache to log the process size, but I don't think that is an easy
> thing to do.  So have a cron job dump a listing of processes and
> memory usage to disk every minute, then you can find the exact time
> and process number and correlate it back to the log file.

Ugh, ok. I was afraid that might be the case. Just thought I'd check to 
see if anyone had any clean way of doing this. Thanks for the help.

-- 
Roger


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_status usage, identifying memory leaks

Posted by Joshua Slive <js...@gmail.com>.
On Mon, 10 Jan 2005 12:21:33 -0800, Roger Harrell
<ro...@audiblefaith.com> wrote:
> > Trouble is the PID is for the child process so it can server a lot of
> >> requests, so that PID will be associated with many different scripts.
> >> This is the same trouble I'm having with mod_status. Am I missing something?
> >
> >
> > No, but it shouldn't be hard to narrow it down if you are seeing the
> > problem relatively frequently.
> 
> Well, that's the thing. It does not happen frequently. It will occur
> over a 3 hour period once a week or so. There does not seem to be any
> unusual patterns in access_log. This is a pretty high traffic site
> (5,000+ visitors per day) so it's tough to isolate anything in the log
> files.

There are no magic tricks here.  It would be nice if it was possible
for apache to log the process size, but I don't think that is an easy
thing to do.  So have a cron job dump a listing of processes and
memory usage to disk every minute, then you can find the exact time
and process number and correlate it back to the log file.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_status usage, identifying memory leaks

Posted by Roger Harrell <ro...@audiblefaith.com>.
> Trouble is the PID is for the child process so it can server a lot of
>> requests, so that PID will be associated with many different scripts.
>> This is the same trouble I'm having with mod_status. Am I missing something?
> 
> 
> No, but it shouldn't be hard to narrow it down if you are seeing the
> problem relatively frequently.

Well, that's the thing. It does not happen frequently. It will occur 
over a 3 hour period once a week or so. There does not seem to be any 
unusual patterns in access_log. This is a pretty high traffic site 
(5,000+ visitors per day) so it's tough to isolate anything in the log 
files.

-- 
Roger


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_status usage, identifying memory leaks

Posted by Joshua Slive <js...@gmail.com>.
On Mon, 10 Jan 2005 10:21:43 -0800, Roger Harrell
<ro...@audiblefaith.com> wrote:
> > On Mon, 10 Jan 2005 09:38:59 -0800, Roger Harrell
> > <ro...@audiblefaith.com> wrote:
> 
> Trouble is the PID is for the child process so it can server a lot of
> requests, so that PID will be associated with many different scripts.
> This is the same trouble I'm having with mod_status. Am I missing something?

No, but it shouldn't be hard to narrow it down if you are seeing the
problem relatively frequently.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_status usage, identifying memory leaks

Posted by Roger Harrell <ro...@audiblefaith.com>.
> On Mon, 10 Jan 2005 09:38:59 -0800, Roger Harrell
> <ro...@audiblefaith.com> wrote:
> 
>> I've been trying to track down the cause of excessive RAM usage for some
>> time. I've tried mod_status, but it does not seem to yield the info I
>> need. I get a list of current requests associated with the PIDs, but
>> those current requests are not necessarily the request causing the problem.
>> 
>> example. I've got 12 Apache child processes. 4 of which are occupying
>> 14% of server RAM. This is excessive. So I use mod_status to try and
>> identify why this is happening. All mod_status tells  me (with extended
>> status on) is one current request each of these children is serving. In
>> each case they are serving pages utilizing different scripts, so it has
>> not given any information on which script might be the culprit. How can
>> I further isolate the problem?
> 
> 
> Change your LogFormat to include the PID, then you can work back in
> the access log to find all recent requests for that process and try to
> find the match.
> 
> Joshua.

Trouble is the PID is for the child process so it can server a lot of 
requests, so that PID will be associated with many different scripts. 
This is the same trouble I'm having with mod_status. Am I missing something?

-- 
Roger


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_status usage, identifying memory leaks

Posted by Joshua Slive <js...@gmail.com>.
On Mon, 10 Jan 2005 09:38:59 -0800, Roger Harrell
<ro...@audiblefaith.com> wrote:
> I've been trying to track down the cause of excessive RAM usage for some
> time. I've tried mod_status, but it does not seem to yield the info I
> need. I get a list of current requests associated with the PIDs, but
> those current requests are not necessarily the request causing the problem.
> 
> example. I've got 12 Apache child processes. 4 of which are occupying
> 14% of server RAM. This is excessive. So I use mod_status to try and
> identify why this is happening. All mod_status tells  me (with extended
> status on) is one current request each of these children is serving. In
> each case they are serving pages utilizing different scripts, so it has
> not given any information on which script might be the culprit. How can
> I further isolate the problem?

Change your LogFormat to include the PID, then you can work back in
the access log to find all recent requests for that process and try to
find the match.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org