tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter lin <peter....@labs.gte.com>
Subject Re: Conncurency issue with tomcat???
Date Thu, 16 May 2002 13:04:39 GMT

Are you invalidating the session once each thread is done with it's 5
requests?  Say for example the 5th request is a logout page, which
invalidates the session. If that happens, theoritically the session id
could appear again.  The base class responsible for generating the
random session id is org.apache.catalina.session.ManagerBase.

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/catalina/docs/api/index.html

I would post a message to tomcat-dev mailing list. My knowledge of the
implementation is limited, so asking on tomcat-dev will get you the
exact answer a bit faster.

peter


"Ghorpade, Rajendra" wrote:
> 
> Peter,
> 
> The server is not restarted. I checked that.
> And in my testing application after the first response i get the cookie and
> resend it in the
> subsequent requests for the same user.
> So the session is managed properly on the client side.
> 
> But this happens only for some of the requests.(roughly 2%)
> As I said before :
> 60 threads,5 request per session, 10 times [asynchronuos reading from input
> stream]=> no exceptions
> 60 threads,5 request per session, 10 times [synchronuos reading from input
> stream]=> get exceptions
> 90 threads,5 request per session, 10 times [asynchronuos reading from input
> stream]=> get exceptions
> 
> Suggestions???
> 
> Note : i want to check the reliability of the application under conncurrent
> load and not the performance(atleast for now).I had never used JMeter.
> 
> Raj
> 
> -----Original Message-----
> From: peter lin [mailto:peter.lin@labs.gte.com]
> Sent: Thursday, May 16, 2002 2:26 PM
> To: Tomcat Users List
> Subject: Re: Conncurency issue with tomcat???
> 
> >From my understanding of the specification, session ID aren't gauranteed
> to be unique, but should be unique while the server is running. If the
> server is restarted, it is possible to get identicle session ids.  I
> doubt this is your problem.  More likely what is happening is your test
> application isn't accepting the cookie. If that is the case, tomcat and
> any servlet container will create an id for every request, so it's
> possible you will get duplicates.
> 
> It's only when the browser accepts the cookie, that registers that
> session id as "taken".
> 
> peter lin
> 
> "Ghorpade, Rajendra" wrote:
> >
> > No! I did'nt tried it with JMeter.
> > But when I ran the test without any processing on the server then it works
> > fine.
> > So I do'nt know how this would affect the behaviour of the server.
> > may be it is the underlined implementation of the socket in the
> > HttpUrlConnection..Just a wild guess!!
> >
> > Did u heard about problem with the same session (sesion id) being
> processed
> > in two different thread at the same time?
> > I had put a check in the *service* method for this.I store the session ID
> in
> > hashtable(class variable to the servlet) when I enter the service method
> and
> > remove it when i get out of this method.The adding and removing is done in
> a
> > synchronized block with hashtable as an argument.So this is thread safe.If
> > there is a session with the same id I throw an Concurrent exception.
> > And to mine suprise I get this exception...:-)
> >
> > Any suggestion????
> >
> > Raj
> >
> > -----Original Message-----
> > From: peter lin [mailto:peter.lin@labs.gte.com]
> > Sent: Thursday, May 16, 2002 1:44 PM
> > To: Tomcat Users List
> > Subject: Re: Conncurency issue with tomcat???
> >
> > have you tried using jakarta JMeter to perform the same test?
> >
> > peter
> >
> > "Ghorpade, Rajendra" wrote:
> > >
> > > Hi again,
> > >
> > > One information missing in the previous mail
> > > I am using tomcat 4.0.1
> > >
> > > Raj
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <mailto:tomcat-user-help@jakarta.apache.org>
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:tomcat-user-help@jakarta.apache.org>
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:tomcat-user-help@jakarta.apache.org>
> 
> --
> To unsubscribe, e-mail:
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:tomcat-user-help@jakarta.apache.org>
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message