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
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.