Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Solved: Software caused connection abort in mod_perl + SOAP::Lite + Apache environment

by sam_bakki (Pilgrim)
on Nov 14, 2013 at 13:24 UTC ( [id://1062574]=perlquestion: print w/replies, xml ) Need Help??

sam_bakki has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks

I have been developing a framework with using SOAP::Lite. Basically, Server exposes set of APIs via SOAP and clients will consume the APIs via SOAP. Both server code (framework code, its huge) and client code (many clients, small ones) are written in perl.

My environment:
Server: Cent OS 6.3 Linux
Apache: 2.2.15 (with pre fork model)
mod_perl: mod_perl-2.0.4-10.el6.x86_64
Perl: v5.10.1
I use normal SOAP::Lite invocation in client, Like below,

.......... my $soapServiceObj = SOAP::Lite->new(); $soapServiceObj->transport()->proxy($self->BUAutoSecureServicesURL(),t +imeout=>800,keep_alive =>1); $soapServiceObj->transport()->no_proxy('localhost','abc.com','in-blr01 +.abc.com'); try { #Log out wont return anything. $soapResult = $self->_soapServiceObj()->doSecureOpeartion(SOAP +::Data->name('sessionID')->value($self->_secureSessionID())->type('st +ring'), SOAP::Data->name('projectName' +)->value($projectName)->type('string'), SOAP::Data->name('operationNam +e')->value($operationName)->type('string'), SOAP::Data->name('operationPar +amsArrRef')->value($operationParamsArrRef)); } catch { $self->_quitWithHTTPException($_); }; .............

Everything works fine , until we started performance testing. We have started 55 clients at a time (using windows start command) so at a time 55 clients will be working with the Server SOAP framework.

Now, out of 55 clients ~13 clients fail to receive input from server.

Client fails with following error message

ERROR: no element found at line 1, column 311296, byte 311296 at /<C:\SecureI +mageCreator.pl>XML/Parser.pm line 187. <br>

I had a look into the server returned XML , Which was in complete. So the XML parser failed.

I have extensive logging mechanism in my server code (using Log4Perl) but nothing useful was reported. Then I looked in to Apache logs, I found
[Thu Nov 14 18:25:47 2013] [error] Software caused connection abort at + /usr/local/share/perl5/SOAP/Transport/HTTP.pm line 615.\n 6 [Thu Nov 14 18:25:47 2013] [error] Software caused connection abor +t at /usr/local/share/perl5/SOAP/Transport/HTTP.pm line 615.\n 7 [Thu Nov 14 18:25:48 2013] [error] Software caused connection abor +t at /usr/local/share/perl5/SOAP/Transport/HTTP.pm line 615.\n 8 [Thu Nov 14 18:25:48 2013] [error] Software caused connection abor +t at /usr/local/share/perl5/SOAP/Transport/HTTP.pm line 615.\n .........


Edit: Some times I see the following error as well in Apache log
[Thu Nov 14 19:08:55 2013] [error] Apache2::RequestIO::read: (70007) T +he timeout specified has expired at /usr/local/share/perl5/SOAP/Trans +port/HTTP.pm line 575


The number of above "Software Caused connection" errors was matched with the number of Clients failed.
When I run the clients with 5 seconds delay , Everything works fine. So I face this issue when I do it in parallel.

Any one had the similar issue with Apache + mod_perl? How to overcome?

Thanks in Advance.

Edit: Problem is solved . As per the pointer given from a veteran monk, I have increased Apache's timeout and it solves the issue. Thanks Monk

Thanks & Regards,
Bakkiaraj M
My Perl Gtk2 technology demo project - http://code.google.com/p/saaral-soft-search-spider/ , contributions are welcome.

  • Comment on Solved: Software caused connection abort in mod_perl + SOAP::Lite + Apache environment
  • Select or Download Code

Replies are listed 'Best First'.
Re: Software caused connection abort in mod_perl + SOAP::Lite + Apache environment (timeout)
by Anonymous Monk on Nov 14, 2013 at 13:56 UTC

    "Software caused connection abort " means some kind of timeout -- so while SOAP::Transport::HTTP::CGI gets this error, I doubt its the cause of it, which is probably apache

    So I'd consider upping the tracing/logging.... to find out which call where is the closest to the error message, then I'd try to reproduce it with a short sample :D

    The other thing I'd consider is updating to current releases of mod_perl/apache/perl/SOAP::Lite for all kind of security+ fixes

      Hi Monk

      Thanks a ton for the timeout pointer. Yes, It was due to Apache's time out (nothing to do with SOAP::Lite / Perl). In Apache config I had very little (2sec) timeout.
      I have increased to 25 min timeout in apache config (because client's timeout set to 20 min). Everything works fine. :)

      Thanks & Regards,
      Bakkiaraj M
      My Perl Gtk2 technology demo project - http://code.google.com/p/saaral-soft-search-spider/ , contributions are welcome.

        What timeout did you increase in Apache's config, exactly? I have the same errors. I see:
        root@taskmaster01:/etc/httpd/conf # grep -i timeout * httpd.conf:Timeout 120 httpd.conf:KeepAliveTimeout 15

        -------------------------------------
        Nothing is too wonderful to be true
        -- Michael Faraday

Re: Software caused connection abort in mod_perl + SOAP::Lite + Apache environment
by Anonymous Monk on Nov 14, 2013 at 14:00 UTC

    Other idea (for comparison) is to use the same number of mod_perl/apache children, to create that number of SOAP::Transport::HTTP::Daemon, and do the testing with just perl , without mod_perl/apache , to see how well it works

    That will at least give you a direction to look for further details

Re: Software caused connection abort in mod_perl + SOAP::Lite + Apache environment
by Anonymous Monk on Nov 14, 2013 at 14:07 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1062574]
Approved by talexb
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (1)
As of 2024-04-25 01:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found