N.Z. Bear wrote:
> I am experiencing a problem with httpd child processes suddenly
> exploding in memory size and consuming all available memory. The
> behavior is sudden, not gradual: within a few seconds or a minute the
> process swells to several orders of magnitude larger than its usual
> size.

My best guess would be a run-away SQL query that has an unconstrained JOIN
in it...

If this is a new phenomenon, check any new/changed scripts for SQL joins.

> added the '%P' variable to my Apache log file and am now able to
> identify the specific requests that the Apache child process which
> explodes was handling prior to the error, but thus far no pattern has
> emerged (different scripts appear last each time). I suspect that the
> last entry I see in the log is the last successful request, not the one
> that causes the problem. (I am aware of log_forensic, which I learned
> would provide log output of a request *before* processing, but my skills
> are not sufficient to make me feel comfortable rebuilding my Apache
> server to include it at this time).

Perhaps a PHP auto_prepend script would let you catch the info you need
and log it...  Note sure the Apache child is available to PHP, but worth
looking into.

> I am working around the issue with a cron script that checks if a child
> process has exploded and then restarts Apache if needed; this helps to
> mask the issue but is obviously not a fix.

You could probably just kill -9 the one child instead of restarting them
all, as an even less intrusive temporary work-around...

Maybe even a graceful, though I suspect the run-away child wouldn't
co-operate.  Might be worth testing, might not, depending on how easily
you can get it to happen.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to