[Xml-compile] Request advice on a networking (??) issue

David Tindall Mcmath mcdave at stanford.edu
Fri Sep 21 20:45:14 GMT 2012


Dear List,

This message may well be pointed at the wrong list, but here's where I'm starting.  (Actually, #perl-help is where I started, but here I am now.)

When I run the script below from my Mac laptop, it hangs after about 250 requests.  On my Linux box, it runs just fine.  When I run "lsof" on the hung process, I see a bunch of TCP connections to the remote server, port 80, in state CLOSED.  It makes me think the problem is that the LWP calls somehow aren't cleaning up after themselves.  When I just make straight LWP "post" calls in the loop, it works fine.  It makes me suspect that there's a problem with the particular way the requests are getting handled in XML::Compile, but I really have very little clue where to look.

I have no idea whether this is an XML::compile issue or an LWP issue, but it's certainly something just on my Mac and not my "real" computer.  I'm not even really expecting much of a solution, just advice on where to start looking.

For the record:

Mac:
  perl version 5.10.0, LWP version 6.03, XML::Compile::SOAP version 2.29

Linux:
  perl version 5.8.8, LWP version 5.830, XML::Compile::SOAP version 2.28

Any comments are appreciated,

dave

--

#!/usr/bin/perl

use strict ;
use warnings ;

use Data::Dumper ;

use XML::Compile::SOAP11 ;
use XML::Compile::WSDL11 ;
use XML::Compile::Transport::SOAPHTTP;

my $wsdl = XML::Compile::WSDL11->new( 'centra2.wsdl' ) ;

local $| = 1 ;

for my $i (1 .. 300 ) {
    print "Attempt #$i" ;
    local $SIG{ALRM} = sub { die "program has hung\n" } ;
    alarm( 20 ) ;
    my $method = $wsdl->compileClient( 'getVersion'
                                           , port => 'CWSSoap'
                              ) ;
    my $ans = $method->() ;
    printf "... read %s\n", $ans->{parameters}->{getVersionResult} ;
    alarm( 0 ) ;
}

--

Output:

Attempt #1... read 7.5.8.0
Attempt #2... read 7.5.8.0
...
Attempt #250... read 7.5.8.0
Attempt #251

(and that's it.  Can't even die).



More information about the Xml-compile mailing list