Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 99930 invoked from network); 3 Mar 2000 23:35:04 -0000 Received: from techunix.technion.ac.il (mailer@132.68.1.28) by locus.apache.org with SMTP; 3 Mar 2000 23:35:04 -0000 Received: by techunix.technion.ac.il (Postfix, from userid 10611) id 2C5008645; Sat, 4 Mar 2000 01:35:00 +0200 (IST) Date: Sat, 4 Mar 2000 01:34:59 +0200 (IST) From: Shachor Gal To: tomcat-dev@jakarta.apache.org, ygary2@yahoo.com Subject: Re: session expiring too quick In-Reply-To: <38C044CB.8E27182C@yahoo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N 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 > >