|
From: <And...@Be...> - 2003-08-13 15:33:56
|
Hey List !
We use the OpenInteract::CommonHandler quite a lot, because it is so =
easy to
use. But: we currently suspect there is a lurking general mem leak in =
there.
What we did:
- to find out, which handler is suspicous after we saw a major mem leak
through looking at the httpd processes, we did the following
- steal idea from Apache::Leak and fold this into this mod_perl =
handler:
--- snip ----
package Apache::MemLogger;
use strict;
use DynaLoader ();
use GTop();
sub handler {
my $r =3D shift;
my $uri =3D $r->uri;
my $gtop =3D GTop->new;
my $proc =3D $gtop->proc_mem($$);
my $size_before =3D $gtop->proc_mem($$)->size();
$r->push_handlers(PerlLogHandler =3D> sub {
my $size_after =3D $gtop->proc_mem($$)->size();
my $diff =3D $size_after - $size_before;
warn "MEM_LOG:$$:$uri:$size_before:$size_after:$diff\n";
});
0;
}
1;
__END__
- then activate this in the httpd.conf of the backend oi apache server =
like
this:
PerlModule Apache::MemLogger;
PerlInitHandler Apache::MemLogger
- now you can grep for MEM_LOG in the error_log_modperl and look for
interesting things e.g. with this shell command:
grep MEM_ error_log_modperl|perl -F: -ane 'print "$F[2],$F[5]\n" if =
$F[5] >
6567680;'
Doing this, we found that the search and show methods ( at least ) =
appear to
have a mem leak in them. Since we in most cases really use the basic
"Common" method, we suspect there might be a bug.
Could please anyone try this out to find this problem ?
Thanks and cheers,
Andreas Nolte
Leitung IT
-----------------------------------------------------------
arvato direct services=20
Olympiastra=DFe 1
26419 Schortens
Germany
http://www.arvato.com/ <http://www.arvato.com/>=20
and...@be...
Phone +49 (0) 4421 - 76- 84002
Fax +49 (0) 4421 - 76- 84111
|