Hi,

What's the best way to find memory leaks in a mod_perl app? I am
trying to use Apache::Leak with mod_perl 1.41

Some notes:

1. My mod_perl app is *HUGE*. Apache::Leak reports over 500,000 SVs. I
think the time it takes to traverse the symbol tables is long enough
to time out my browser (I'm seeing the output from what looks like a
second request or an error handler.)

2. Should I compile perl with any special options, like DEBUG?
Apache::Leak reports I am leaking ~50 SVs, and I see a lot of "old"
messages, but not a lot of other useful information to track down the
leakage.

3. I'm putting the leak detection code right around my handler
function (which I've renamed to 'real_handler')

sub handler {
  my @args = @_;
  my $response;
  leak_test {
    $response = real_handler(@args);
  };
  $response;
}

sub real_handler { ... } # original handler routine

Any issues with that?

Thanks,

ER

Reply via email to