You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Charlie Toohey <ct...@pacbell.net> on 2003/01/14 21:07:51 UTC
Tomcat losing session
Infrequently, Tomcat is creating a new session on each request from the same
cookie, when all of the requests should be in the same session.
I am logging the cookie and session ids to debug this. What I see is that a
request comes in with cookie JSESSIONID=X. Tomcat creates a new session, with
session id=Y. Then, another request comes in from the same client, and cookie
value JSESSIONID=X (still). Tomcat creates a new session again, with session
id=Z.
What happens most of the time is that client request comes in with cookie
value JSESSIONID=X, and Tomcat creates a new session with session id = Y.
When another request comes in from the same client, cookie value JSESSIONID
now = Y, and Tomcat session id is Y. As expected.
The same requests can produce the two different scenarios, so it does not
appear to be specific to the resource which is requested. But there are more
specifics --- when this happens, the first resource requested in the session
is a servlet, which does a sendRedirect, resulting in the request. I don't
know if there is something about this sequence that could cause the problem.
As I said, this happens very infrequently, and can not be reproduced at will.
When it does happen, it happens on every request from the client --- every
request receives the same cookie JSESSIONID value, but creates a new session.
It's like once it gets into that mode, it can't get out.
Has anyone else ever experience this behavior of losing sessions ?
We are using Tomcat 4.1.12 with Apache 1.3.27 running on Mandrake Linux 8.1.
Thanks for any help,
Charlie
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>