Loading ...
Sorry, an error occurred while loading the content.

5445SOAP::Lite, WSDL and execution loops/delays

Expand Messages
  • Scott Francis
    Jun 19 4:37 PM
      So I'm using SOAP::Lite to build a Perl interface to a NetScaler load
      balancer (end goal is to have servers added and removed from a pool in
      an automated fashion). The interface is via WSDL[0], and my code[1]
      successfully connects (uses HTTP::Cookies for authentication),
      executes a command and parses the response.

      However ... (you knew that was coming :))

      I'm running into a strange delay during execution. It appears to
      happen when my SOAP object is instantiated (client-side), as opposed
      to being an HTTP transport delay or a server-side delay. The delay
      appears to be about the same regardless of command - approx. 70-80
      seconds on my Ubuntu desktop (similar results on an unloaded OpenBSD
      server and an OS X iBook). During the delay, CPU is pegged (although
      the system functions normally otherwise).

      Output with trace turned off:

      [sfrancis@basalt:~]$ time ./netscaler_soap.pl
      version string: "NetScaler NS6.0: Build 47.18, Date: Jul 25 2005, 12:54:43 "
      ./netscaler_soap.pl 76.02s user 0.47s system 89% cpu 1:25.30 total

      When I turned on
      SOAP::Lite->import(+trace => "all");
      and directed output to a temp file[2], I found that the code was doing
      a little over 560,000 apparently empty
      SOAP::Data::new()/SOAP::Data::DESTROY() loops during the instantiation
      of the SOAP object. I have run my code past a few other pairs of eyes,
      and haven't received any gotchas so far; it appears to be fairly
      standard. The advice I've received thus far is that WSDL support in
      Perl (and SOAP::Lite in particular) is somewhat sketchy, but that's
      about as far as anybody's gotten. I'm hoping that somebody with more
      knowledge of the SOAP::Lite internals (hi Byrne!) can show me what I'm
      doing wrong (if anything), and how to patch my code to avoid this
      execution delay.

      (The code is a patch to a larger Perl script that is itself part of a
      CGI that is a bandaid to some broken behavior of code on IIS servers
      that must be reset every so often or they die. A 70+ second delay per
      machine is probably going to be untenable, and I haven't had any luck
      getting any of the actual developers to take a look at fixing this
      problem in .NET (which would make sense, since the bandaid itself is a
      set of ASP scripts running on IIS that reset IIS servers) - nobody
      wants to touch the thing, so it ends up in the UNIX admins' laps. :))

      This is SOAP::Lite v0.67, by the way; primary test platform is
      perl-5.8.7 on Ubuntu (Dapper), kernel-2.6.15.

      thanks in advance for giving this the once-over!
      Comments/errata/patches welcome.

      darkuncle@{gmail.com,darkuncle.net} || 0x5537F527
      encrypted email to the latter address please
      http://darkuncle.net/pubkey.asc for public key

      [0] http://darkuncle.net/perl/NSConfig.wsdl # the NetScaler WSDL config file
      [1] http://darkuncle.net/perl/netscaler_soap.pl # the code
      [2] http://darkuncle.net/perl/getnsversion.out.gz # gzipped output;
      trace => "all"
    • Show all 3 messages in this topic