You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "Ghorpade, Rajendra" <RG...@onebridge.de> on 2002/05/16 12:15:55 UTC
Conncurency issue with tomcat???
Hi all,
I have a strange problem to discuss.
Background :
We are using a servlet as an entry point to our application.We are using
tomcat as the servlet engine.
So the concurrent users to our application depends on the concurrecy support
by the tomcat.We have developed a simulator to send the request to our
application throught this servlet.
Now the problem :
We use java.net.HttpUrlConnection to send requests to tomcat.Each user send
5 requests with different parameters.The simulator was set to 60 concurrent
users and for 10 times each. i.e number of concurrent request are 60 and
total requests are 3000(60 * 5 * 10).
Each response from the server is roughly a string of 6000 bytes. We are
reading asynchronously (InputStream in a new thread) on the simulator side.
With 60 users it works fine. But when we increase the number of conncurrent
users to 90 the server behave strangely.
like :
1. Sometimes we see that the same session is started in two threads
concurrently.
2. Sometimes one of the request for the user is processed two
times.
I wonder where is the problem. In the HttpUrlConenction or in the servlet
engine.
What we think is it may be due to the speed of reading the bytes from the
input stream of HttpUrlConnection.Because when we read the data with the
BufferedInputStream we get the same problem with even 60 concurrent
users.This was solved by useing the Asyncronous Input stream.
But above all I wonder how can a client influence the behaviour of the
server???
Ur help is highly appreciated.
I am using tomcat 4.0.1
Rajendra Ghorpade
Software Engineer
OneBridge AG - simplifying voice technologies -
Friedrich-Ebert-Strasse
D 51429 Bergisch Gladbach
Fon: +49 (0)2204 / 845-118
Fax: +49 (0)2204 / 845-101
Mobil: +49 (0)162/345 0758
Email: rghorpade@onebridge.de
Web: www.onebridge.de
Voice Games - Wählen, hören, spielen und urteilen Sie selbst. Begeben Sie
sich mit uns auf eine kleine Reise und knacken Sie die Schatztruhe der
OneBridge AG. Jetzt anrufen: 0180 / 545 00 74 ( EUR 0.12/Min.)
Voice Games - Dial, play, and hear how it works. Come with us on a short
trip and try to break open the treasure chest of OneBridge AG. Call now:
0180 / 545 00 74 ( EUR 0.12/min.)
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Conncurency issue with tomcat???
Posted by Remy Maucherat <re...@apache.org>.
> 1. Sometimes we see that the same session is started in two threads
> concurrently.
That, I can imagine it could happen.
I don't think it would, but at least I can imagine there could be a bug
somewhere with the manager which would cause this.
> 2. Sometimes one of the request for the user is processed two
> times.
I don't think this can happen. (single request, being parsed once, and being
processed twice)
You can test with Coyote 1.0b8 to see what happens. If it works fine with
that, then it is a problem with the HTTP connector. If it still doesn't work
(especially the second point, which would be a problem with the connector),
then it's a bug with the client.
You should also use some other HTTP clients to see what happens (commons
HTTPClient, or the HTTP client Peter Lin mentioned).
Remy
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>