tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shachor Gal <shac...@techunix.technion.ac.il>
Subject Re: session expiring too quick
Date Fri, 03 Mar 2000 23:34:59 GMT
                                                                            
 First, I do not want to take credit for something that I only fixed (:-))  
but other then that you partially correct, yes we can check the timeout in  
the access() method and it will improve the granularity in some of the
cases, but this is not enough.

Tomcat need also to check and remove stale sessions that the user does not
access anymore, so we need a b/g thread to gc stale sessions. Passing over
all the active sessions in a busy system can be very demanding
so we traded granularity for performance (nobody that I know of
really care about 60 sec's of session time out).

	Gal Shachor

On Fri, 3 Mar 2000, Gary Yang wrote:

> Gary Yang wrote:
> 
> > Shachor Gal wrote:
> >
> > >  I think that I fixed this problem yesterday. So if you will use todays
> > > build it supposed to be there.
> > >
> > > However, the defaultSessionTimeOut in server.xml is not in use anymore,
> > > instead you will need to set the session timeout in web.xml (The servlet
> > > API 2.2 deployment descriptor.)
> > >
> > > Note that you can use TOMCAT_HOME/conf/web.xml to provide default timeout
> > > for all the contexts.
> > >
> > > Tell me if it works (remember this should be in the latest build).
> > >
> > >         Gal Shachor
> > >
> > > On Fri, 3 Mar 2000, Eric Lebetsamer wrote:
> > >
> > > > I noticed this same problem.  I assumed that it is a bug in 3.1.  I had
to
> > > > move backwards to 3.0 to fix the problem.  Waiting for a fix.
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> >
> > Why the minium timeout is 60 seconds? From
> > src/share/org/apache/tomcat/session/StandardManager.java,
> >  it seems that tomcat checks all sessions each 60 seconds. Why don't you check if
> > a session is time out when a new access comes?
> > I mean, why don't you check it in method access() of StandardManager.java?
> 
> Sorry, here should be StandardSession.java.
> 
> >
> >     public void access() {
> >
> >         this.lastAccessedTime = this.thisAccessedTime;
> >         this.thisAccessedTime = System.currentTimeMillis();
> >         this.isNew=false;
> >
> >         if (this.thisAccessedTime-this.lastAccessedTime >
> > this.maxInactiveInterval) {
> >             // timeout ....
> >
> >         }
> >   }
> >
> > If use this method, the minium maxInactiveInterval can be less than 60...the unit
> > can even be ms:-)
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> 
> 


Mime
View raw message