[prev in list] [next in list] [prev in thread] [next in thread] 

List:       axis-user
Subject:    Tomcat/Axis2 occasionally queues requests made at the same time
From:       "Marshall, Simon" <Simon.Marshall () misys ! com>
Date:       2009-04-27 11:53:21
Message-ID: 63C2A154B1708946B60726AFDBA00AC004E519C3 () ukmailemea01 ! misys ! global ! ad
[Download RAW message or body]

Hi Guys, I had a poke around the archive but I couldn't see any other
mention of this.

I'm using tomcat-6.0.18/axis2-1.4.1, exposing a bunch of methods in my
Java class as web services via the .aar file.

One of my methods may take a long time to complete, ie, the request may
take some time to process before the response goes back.  Generally,
this works just fine, I only have to ensure that maxThreads in
apache-tomcat-6.0.18\conf\server.xml is large enough such that no
request would be queued while other request threads return (as described
in http://tomcat.apache.org/tomcat-6.0-doc/config/http.html).

However, I've come across a problem whereby if a bunch of requests are
made "at the same time" (I guess "very close together"), occasionally
one or two of the requests appear to be queued somewhere until the other
requests complete.  This does not appear to happen if the requests are
made spread out over time (but are all made before any other requests
complete).

This does not seem to have anything to do with maxThreads; I have set it
to 1000 but can occasionally see this problem with 10 client requests in
10 seconds, whereby (say) 2 or 3 requests occur "at the same time".
When this happens, I see only 9 invocations of my method are made on the
server.  When (some of) those 9 methods eventually return, suddenly the
remaining invocation of my method is made on the server.  Obviously I
don't want this to happen - I don't want one client held up just because
it made its request at the same time as another and was unlucky.

My question is: is this a problem with tomcat-6.0.18/axis2-1.4.1 or do I
have to configure something other than maxThreads?

Thanks, Simon.

Some extra info: my test client is a C# program that creates a thread in
which to make each request.  Before making its request, the thread can
sleep a random amount of time.  I occasionally see the above problem
when a number of these threads sleep the same amount of time before
making their request.  The client thread makes its request by calling a
method on my service via an instance of a HttpSoap11Endpoint class
created from the WSDL.



"Misys" is the trade name for Misys plc (registered in England and Wales). \
Registration Number: 01360027. Registered office: One Kingdom Street, London W2 6BL, \
United Kingdom. For a list of Misys group operating companies please go to \
http://www.misys.com/corp/About_Us/misys_operating_companies.html. This email and any \
attachments have been scanned for known viruses using multiple scanners. This email \
message is intended for the named recipient only. It may be privileged and/or \
confidential. If you are not the named recipient of this email please notify us \
immediately and do not copy it or use it for any purpose, nor disclose its contents \
to any other person. This email does not constitute the commencement of legal \
relations between you and Misys plc. Please refer to the executed contract between \
you and the relevant member of the Misys group for the identity of the contracting \
party with which you are dealing. 


[Attachment #3 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.53">
<TITLE>Tomcat/Axis2 occasionally queues requests made at the same time</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">Hi Guys, I had a poke around the \
archive but I couldn't see any other mention of this.</FONT></SPAN> </P>

<P><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">I'm using tomcat-6.0.18/axis2-1.4.1, \
exposing a bunch of methods in my Java class as web services via the .aar \
file.</FONT></SPAN> </P>

<P><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">One of my methods may take a long \
time to complete, ie, the request may take some time to process before the response \
goes back.&nbsp; Generally, this works just fine, I only have to ensure that \
maxThreads in apache-tomcat-6.0.18\conf\server.xml is large enough such that no \
request would be queued while other request threads return (as described in \
</FONT></SPAN><A HREF="http://tomcat.apache.org/tomcat-6.0-doc/config/http.html"><SPAN \
LANG="en-gb"><U><FONT COLOR="#0000FF" SIZE=2 \
FACE="Arial">http://tomcat.apache.org/tomcat-6.0-doc/config/http.html</FONT></U></SPAN></A><SPAN \
LANG="en-gb"><FONT SIZE=2 FACE="Arial">).</FONT></SPAN></P>

<P><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">However, I've come across a problem \
whereby if a bunch of requests are made &quot;at the same time&quot; (I guess \
&quot;very close together&quot;), occasionally one or two of the requests appear to \
be queued somewhere until the other requests complete.&nbsp; This does not appear to \
happen if the requests are made spread out over time (but are all made before any \
other requests complete).</FONT></SPAN></P>

<P><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">This does not seem to have anything \
to do with maxThreads; I have set it to 1000 but can occasionally see this problem \
with 10 client requests in 10 seconds, whereby (say) 2 or 3 requests occur &quot;at \
the same time&quot;.&nbsp; When this happens, I see only 9 invocations of my method \
are made on the server.&nbsp; When (some of) those 9 methods eventually return, \
suddenly the remaining invocation of my method is made on the server.&nbsp; Obviously \
I don't want this to happen - I don't want one client held up just because it made \
its request at the same time as another and was unlucky.</FONT></SPAN></P>

<P><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">My question is: is this a problem \
with tomcat-6.0.18/axis2-1.4.1 or do I have to configure something other than \
maxThreads?</FONT></SPAN></P>

<P><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">Thanks, Simon.</FONT></SPAN>
</P>

<P><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Arial">Some extra info: my test client is a \
C# program that creates a thread in which to make each request.&nbsp; Before making \
its request, the thread can sleep a random amount of time.&nbsp; I occasionally see \
the above problem when a number of these threads sleep the same amount of time before \
making their request.&nbsp; The client thread makes its request by calling a method \
on my service via an instance of a HttpSoap11Endpoint class created from the \
WSDL.</FONT></SPAN><SPAN LANG="en-us"></SPAN></P>

<br><br>
<SPAN style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: \
'Arial','sans-serif'"><?xml:namespace prefix = o ns = \
"urn:schemas-microsoft-com:office:office" /><o:p> <P class=MsoNormal style="MARGIN: \
5pt 0cm; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: gray; \
FONT-FAMILY: 'Arial','sans-serif'">"Misys" is the trade name for Misys plc \
(registered in England and Wales). Registration Number: 01360027. Registered office: \
One Kingdom Street, London W2 6BL, United Kingdom. For a list of Misys group \
operating companies please go to <A \
href="http://www.misys.com/corp/About_Us/misys_operating_companies.html">http://www.misys.com/corp/About_Us/misys_operating_companies.html</A>. \
This email and any attachments have been scanned for known viruses using multiple \
scanners. This email message is intended for the named recipient only. It may be \
privileged and/or confidential. If you are not the named recipient of this email \
please notify us immediately and do not copy it or use it for any purpose, nor \
disclose its contents to any other person. This email does not constitute the \
commencement of legal relations between you and Misys plc. Please refer to the \
executed contract between you and the relevant member of the Misys group for the \
identity of the contracting party with which you are dealing. </SPAN></P> <P \
class=MsoNormal style="MARGIN: 5pt 0cm; mso-layout-grid-align: none"><SPAN \
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: \
'Arial','sans-serif'"><o:p></o:p></SPAN>&nbsp;</P></o:p></SPAN> </body>
</HTML>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic