You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Marshall, Simon" <Si...@misys.com> on 2009/04/27 13:53:21 UTC

Tomcat/Axis2 occasionally queues requests made at the same time

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.