----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files. Don't make us guess your problem!!!
----------------------------------------------------------------
At this point, you might want to try something like this:
- If you don't have any objects that you put in sessions that
implement HttpSessionBindingListener, implement such an object, and
have your servlets put an instance of it in the session when you
put the rest of the stuff in the session.
- In the implementation of valueUnbound(HttpSessionBindingEvent event),
put some logging code to record what's happening. This listener method
will get called when the session times-out. I suggest something like this:
try
{
throw new Exception( "valueUnbound()" );
}
catch( Exception e )
{
e.printStackTrace();
}
This will print the call-stack at the point your session is going out
of scope.
- You might also save System.currentTimeMillis() in valueBound(), and
compare that to the syetm time in valuyeUnbound() to see how long the
session
was "alive".
This should at least give you some diagnostic info about what's happening to
your
sessions.
- Fernando
> One thing we've noticed is that it isn't just the cookie that is
> disappearing, it's the actual session object on the server as
> well. When we
> list out sessions in the session context, and let users stand
> idle... most
> users will be fine and sit in the list until their session expires like
> normal, but some seem to expire early for no apparent reason. And indeed,
> real users have complained that they were in the middle of doing something
> when their session expired.
>
> One question: Do all of your sessions die prematurely? Is EVERY
> one timing
> out at 5 mins? Because with us it only seems to be with certain
> users/computers/browsers (we're trying to figure out what the difference
> is).
>
> Kevin
>
> -----Original Message-----
> From: Jonathon W. Ross <[EMAIL PROTECTED]>
> To: Java Apache Users <[EMAIL PROTECTED]>
> Date: Friday, June 23, 2000 8:07 PM
> Subject: Re: Session timeout problems
>
>
> >----------------------------------------------------------------
> >BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
> >WHEN YOU POST, include all relevant version numbers, log files,
> >and configuration files. Don't make us guess your problem!!!
> >----------------------------------------------------------------
> >
> >The JVM is not dying, I watched it stay there for about an hour.
> >
> >Further to some other comments, these sessions only last
> >five minutes even IF the user is active.
> >
> >It could go:
> >
> >Minute 0 - User gets session cookie
> >Minute 1 - User accesses page, session is valid
> >Minute 4 - User accesses page, session is valid
> >Minute 5 - User accesses page, gets another new session cookie
> >
> >It has got me stumped.
> >
> >The configuration is copied from the example files with
> >only repositories and so forth changed. The thing that
> >I don't get is that the session works fine for 5 minutes
> >and THEN disappears, but it DOES work for that short time!
> >
> >I'd love to hear if anyone else has any more ideas!
> >
> > JWR
> >
> >
> >
> >On Fri, Jun 23, 2000 at 11:48:08AM -0400, Fernando Salazar said:
> >--> ----------------------------------------------------------------
> >--> BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
> >--> WHEN YOU POST, include all relevant version numbers, log files,
> >--> and configuration files. Don't make us guess your problem!!!
> >--> ----------------------------------------------------------------
> >-->
> >-->
> >--> Just a thought ... are you using JServ in manual or automatic mode?
> >--> If automatic, maybe something is happening to kill the JVM every
> >--> 5 mins. When that happens, all sessions would go away -- along
> >--> with everything else, of course. The JVM would then get restarted,
> >--> and a client probably wouldn't notice anything.
> >-->
> >--> Like other folks have observed, I've used sessions for long periods
> >--> with no problems.
> >-->
> >--> - Fernando
> >-->
> >--> > > ----------------------------------------------------------------
> >--> > >
> >--> > > Same here. About 5 minutes.
> >--> > > I think it may have something to do with the users' inactivity
> >--> > period. We
> >--> > > are not using JServ in production environment (still in dev
> >--> > stage), but this
> >--> > > will be a big issue when we move to prod.
> >--> > > Anyone knows if this is fixed in Tomcat?
> >--> >
> >--> > Is what fixed? We have been using session control via
> cookies with a
> one
> >--> > hour timeout and have had no problems whatsoever with session
> timeouts.
> >--> > aybe you are not using cookies properly?
> >--> >
> >--> > Ben Ricker
> >--> > Web Administrator
> >--> > US-Rx, Inc.
> >--> >
> >-->
> >-->
> >-->
> >--> --
> >--> --------------------------------------------------------------
> >--> Please read the FAQ! <http://java.apache.org/faq/>
> >--> To subscribe: [EMAIL PROTECTED]
> >--> To unsubscribe: [EMAIL PROTECTED]
> >--> Archives and Other: <http://java.apache.org/main/mail.html>
> >--> Problems?: [EMAIL PROTECTED]
> >-->
> >
> >--
> >+---------------------------------------------------+------------
> ----------
> +
> >| Jonathon W. Ross | Web:
www.isa.net.au
|
>| Systems Administrator | Tel: +61 2 6230 4444
|
>| Internet Solutions Australia Pty Ltd | Fax: +61 2 6230 4455
|
>| Wholly Owned Subsidiary of Ramsgate Resources Ltd | ACN: 086 692 211
|
>+---------------------------------------------------+----------------------
+
>
>
>
>--
>--------------------------------------------------------------
>Please read the FAQ! <http://java.apache.org/faq/>
>To subscribe: [EMAIL PROTECTED]
>To unsubscribe: [EMAIL PROTECTED]
>Archives and Other: <http://java.apache.org/main/mail.html>
>Problems?: [EMAIL PROTECTED]
>
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]