You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by da...@servicecanada.gc.ca on 2006/05/06 01:48:37 UTC
PerlAccessHandler Leaks memory when using Soap::Lite to make a web
service call (win32)
I've been trying to solve this problem for a week now with no luck
I have an apache 2.x web server running mod_perl.
I'm trying to write a perlaccesshandler that has to make a web service call to a .net web service. The module works fine but each hit cause a leak of around 25-30k. The module is as follows:
package Apache::EVC3;
use Apache::Const qw(OK REDIRECT);
use SOAP::Lite;
sub handler {
my $r = shift;
$r->content_type('text/html');
my $soap = SOAP::Lite
-> uri('<someuri>)
-> on_action( sub { return '"<somemethod>"' } )
-> proxy('http://isci-msmuser:sadeisci@172.20.2.253/isci-ivcpi/msmws/msm.asmx');
my $method = SOAP::Data->name('<somemethod>')
->attr({xmlns => 'somens'});
my $query =
SOAP::Data
->name(inputQuery =>
SOAP::Data->value(
SOAP::Data->name(applicationID => 'val1'),
SOAP::Data->name(entrustID => 'val2')
)
);
my $result = $soap->call($method => $query);
return OK;
}
1;
Does anyone see anything blatantly obvious that could explain this? I've been pulling my hair out for a while.
D
Re: PerlAccessHandler Leaks memory when using Soap::Lite to make
a web service call (win32)
Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
damion.fusco@servicecanada.gc.ca wrote:
> I've been trying to solve this problem for a week now with no luck
>
> I have an apache 2.x web server running mod_perl.
>
> I'm trying to write a perlaccesshandler that has to make a web service
> call to a .net web service. The module works fine but each hit cause a
> leak of around 25-30k. The module is as follows:
>
> package Apache::EVC3;
>
> use Apache::Const qw(OK REDIRECT);
You're using an ancient version of mod_perl pre 2.0 RC5
This might be a leak thats been fixed.
READ:
http://perl.apache.org/docs/2.0/rename.html
> use SOAP::Lite;
>
> sub handler {
>
> my $r = shift;
> $r->content_type('text/html');
>
> my $soap = SOAP::Lite
> -> uri('<someuri>)
> -> on_action( sub { return '"<somemethod>"' } )
> ->
> proxy('http://isci-msmuser:sadeisci@172.20.2.253/isci-ivcpi/msmws/msm.asmx');
>
>
> my $method = SOAP::Data->name('<somemethod>')
> ->attr({xmlns => 'somens'});
>
> my $query =
> SOAP::Data
> ->name(inputQuery =>
> SOAP::Data->value(
> SOAP::Data->name(applicationID => 'val1'),
> SOAP::Data->name(entrustID => 'val2')
> )
> );
>
> my $result = $soap->call($method => $query);
>
> return OK;
>
> }
I don't see anything blatantly wrong. It coiuld be SOAP::Data causing it though.
--
------------------------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F 6A47 D55A 7172 A799 97F
"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."