Hi! 

I have a problem with Parallel::RobotUA. The following code leaks. At each
iteration, it grows of about 12k (the size of the file is ~14k) at each
iteration. 

But if I change Parallel::RobotUA for Parallel:UserAgent, it's 
ok, except for a few kilobytes every 4-7 iterations. Anybody have an idea
why? 

Thanks for you help!

Marc-Andr� Dumas
[EMAIL PROTECTED]

-------- 
#!/usr/bin/perl -w 
use strict; 
use LWP::Parallel::UserAgent; 
use LWP::Parallel::RobotUA; 
#use LWP::Debug '+'; 

while(1) 
{ 
       &down(); 
       system("ps -vx | egrep 'perl|MEM'"); 
} 

sub down(){ 
               my $pua = new LWP::Parallel::RobotUA 
("XR/2.1", '[EMAIL PROTECTED]'); 
               $pua->timeout   (25);  # in seconds 
               #$pua->delay    (1);  # in seconds 
               $pua->max_req  (2);  # max parallel requests per 
server 
               $pua->max_hosts (30);  # max parallel servers accessed 
               $pua->redirect  (0); 
               $pua->max_size(150000); 

               $pua->register 
(HTTP::Request->new('GET',"http://www.yahoo.ca")); 
               my $entries=$pua->wait(); 
} 

----- 

Here is my configuration: 

$perl -V 
Summary of my perl5 (revision 5.0 version 6 subversion 0) 
configuration: 
 Platform: 
   osname=linux, osvers=2.2.14-12, archname=i686-linux 
   uname='linux www.x-recherche.com 2.2.14-12 #1 tue apr 25 13:04:07 
edt 2000 i686 unknown ' 
   config_args='-de' 
   hint=recommended, useposix=true, d_sigaction=define 
   usethreads=undef use5005threads=undef useithreads=undef 
usemultiplicity=undef 
   useperlio=undef d_sfio=undef uselargefiles=define 
   use64bitint=undef use64bitall=undef uselongdouble=undef 
usesocks=undef 
 Compiler: 
   cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux 
(egcs-1.1.2 release) 
   cppflags='-fno-strict-aliasing -I/usr/local/include' 
   ccflags ='-fno-strict-aliasing -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' 
   stdchar='char', d_stdstdio=define, usevfork=false 
   intsize=4, longsize=4, ptrsize=4, doublesize=8 
   d_longlong=define, longlongsize=8, d_longdbl=define, 
longdblsize=12 
   ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8 
   alignbytes=4, usemymalloc=n, prototype=define 
 Linker and Libraries: 
   ld='cc', ldflags =' -L/usr/local/lib' 
   libpth=/usr/local/lib /lib /usr/lib 
   libs=-lnsl -lndbm -ldb -ldl -lm -lc -lposix -lcrypt 
   libc=/lib/libc-2.1.1.so, so=so, useshrplib=false, 
libperl=libperl.a 
 Dynamic Linking: 
   dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, 
ccdlflags='-rdynamic' 
   cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' 

Characteristics of this binary (from libperl): 
 Compile-time options: USE_LARGE_FILES 
 Built under linux 
 Compiled at Jun 15 2000 16:14:21 
 @INC: 
   /usr/local/lib/perl5/5.6.0/i686-linux 
   /usr/local/lib/perl5/5.6.0 
   /usr/local/lib/perl5/site_perl/5.6.0/i686-linux 
   /usr/local/lib/perl5/site_perl/5.6.0 
   /usr/local/lib/perl5/site_perl 





_______________________________________________________
Get 100% FREE Internet Access powered by Excite
Visit http://freelane.excite.com/freeisp

Reply via email to