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

SOAP::LITE client timeout makes ALL my Catalyst app to wait

Expand Messages
  • Miguel Barco
    Hi!, in my Catalyst app, I have a very important connection to a remote server using SOAP with WSDL. Everything works fine, but when the remote server goes
    Message 1 of 1 , Jun 15 2:25 PM
    • 0 Attachment
      Hi!, in my Catalyst app, I have a very important connection to a remote server using SOAP with WSDL.
      Everything works fine, but when the remote server goes down due to any reason, ALL my app waits until the timeout expires. EVERYTHING, ALL the controllers and processes, ALL the clients!!
      If I set a 15 secs timeout, everything wait for 15 secs!!
      Any page from any user or connection can't be displayed during the timeout wait.

      I use Fast CGI and Ngnix for the Catalyst app. If I use multiple processes when one waits, others take care of the connections, but if all try to access the SOAP... they all end waiting for an answer until their timeouts.

      I read somewhere that SOAP::LITE is "single threaded".

      Is it true??? Does it means that ALL my app, with ALL the visitors can only use one SOAP connection????It is hard to believe. Please, can someone point me in the rigth direction?


      This is my code for the call:
      sub check_result { my ($self, $code, $IP, $PORT) = @_;my $soap = SOAP::Lite->new( proxy => "http://$IP:$PORT/REMOTE_SOAP +");$soap->autotype(0); $soap->default_ns('http://REMOTENAMESPACE/namespace/default'); $soap->transport->timeout(15); $soap-> on_fault(sub { my($soap, $res) = @_; eval { die ref $res ? $res->faultstring : $soap->transport->st +atus }; return ref $res ? $res : new SOAP::SOM; }); my $som = $soap->call("remote_function", SOAP::Data->name( 'Entry1' )->value( $code ), ); return $som->paramsout; }

      Thank you in advance.
      Miguel
    Your message has been successfully submitted and would be delivered to recipients shortly.