For Programmers: Free Programming Magazines  


Home > Archive > PERL Miscellaneous > August 2007 > Memory leaks with SOAP Lite









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Memory leaks with SOAP Lite
jrpfinch

2007-08-30, 7:54 pm

I would be interested to know why the following script eats up an ever-
increasing amount of memory. I have tried it with perl 5.8.8 on Intel
Solaris 9, Sparc Solaris 8 and Redhat Linux boxes all with the same
result. Assigned SOAP Lite to a variable and printing that instead
yields the same result.

use strict;
use warnings;
use SOAP::Lite;

while (1)
{
print SOAP::Lite
-> uri("http://172.19.17.252:443")
-> proxy("http://172.19.17.252:443", timeout => 5)
-> kickWatchdog("gerard")
-> result."\n";
sleep 5;
}

Many thanks

Jon

jrpfinch

2007-08-30, 7:55 pm

Solution is to use the OO version:

use strict;
use warnings;
use SOAP::Lite;
my $soap = SOAP::Lite
-> uri('http://172.19.17.252:443/')
-> proxy('http://172.19.17.252:443/');




my $response;

while (1)
{

$response = $soap
-> kickWatchdog("gerard")
-> result;

print "$response\n";
sleep 5;
}

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com