perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Perrin Harkins <per...@elem.com>
Subject Re: possible memory leaks, FreeBSD,mod_perl/1.29
Date Fri, 29 Sep 2006 19:30:26 GMT
On Fri, 2006-09-29 at 19:31 +0300, Assen Tchorbadjiev wrote:
> This is the dummy handler package
> ====================
> package My::X;
> sub handler {
> 	my $r = shift;
> 	$r->content_type( 'text/html' );
> 	$r->send_http_header();
> 	$r->print( $$ );
> 	200;
> }
> 1;

That's all you have loaded?

This code does have a bug, which is the 200 at the end.  You should
return OK from Apache::Const instead.  These are not HTTP response
codes.

I don't use FreeBSD, but I would second Jonathan's advice about
measuring size every 100-1000 requests rather than every request.  It
can take a while to hit equilibrium because of the way perl allocates
memory.

- Perrin


Mime
View raw message