I did the exact same thing... But the kill(-9,$pid) didn't work, even 
when run as root.  Unfortunatly, Apache::Watchdog::RunAway is just as 
lame as our solutions (Sorry Stas), in that it relies on an external 
process that checks the apache scoreboard and kills anything that's 
been running for "X" amount of time.

You could, in theory just reduce the "Timeout" option in apache to 
"X" above to achieve the same result, and avoid the external process 
altogether.

The problem, I'm afraid, is that I start hemorrhaging memory at the 
rate about 4 megs per second, and after 300 seconds, I have a process 
with just over 1200 megs of memory.  The machine itself handles this 
fine, but if the user stops and  does whatever it is they're doing 
again, I end up with two of those 1200 meg processes... which the 
machine cannot handle.

I'm hoping someone else has a more sophisticated solution to tracing 
runaway processes to their source.  If not, I'll have to write some 
internal stuff to do the job...

Robert Landrum

>Yes, I've seen this happen often, maybe once a day on a relatively heavily
>used site running mod_perl, where a child process goes into a state where
>it consumes lots of memory and cpu cycles.  I did some investigation, but
>(like you, it sounds) couldn't garner any useful info from gdb traces.
>
>I solved (?) this by writing a little perl script to run from cron
>and watch for and kill these runaways, but it's an admittedly lame
>solution.  I've meant for a while to look into Stas'
>Apache::Watchdog::RunAway module to handle these more cleanly, but never
>did get around to doing this.
>
>Let us know if you do get to the bottom of this.
>
><Steve>
>
>On Mon, 29 Jan 2001, Robert Landrum wrote:
>
>> I have some very large httpd processes (35 MB) running our
> > application software.  Every so often, one of the processes will grow

...

> > Has anyone had to deal with this sort of problem in the past?
>>
>> Robert Landrum
>>
>
>=-=-=-=-=-=-=-=-=-=-  My God!  What have I done?  -=-=-=-=-=-=-=-=-=-=
>Steve Reppucci                                       [EMAIL PROTECTED] |
>Logical Choice Software                          http://logsoft.com/ |

Reply via email to