tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hans Schmid" <Hans.Sch...@einsurance.de>
Subject TC3.3 updating a webapp without killing sessions
Date Wed, 28 Nov 2001 09:25:14 GMT
Hi,

We try to make a workaround for the following problems:
1.) memory management
2.) application update
3.) do not kill active sessions

Perhaps someone can comment on the startegy and answer some questions.


Our environment:
Tomcat 3.3 final with mod_jk Apache 1.3.19 on Solaris 2.7 Sparc

Our problem:
ever growing cache until memory runs out (clearly an application problem)
plus soft updates to our application without killing actiove sessions

The idea:
when a certain ammount of memory is reached by the tomcat java process,
start up a second
Tomcat and route all new requests to the second instance while existing
sessions should phase out
on the first instance.
If no more sessions are active on the original Tomcat, shut it down
(currently we just shut it down 30 minutes after the second Tomcat started
up)

How to do it with mod_jk:
We have two versions of a worker.properties. Before we start up our second
tomcat,
we switch a link to point to the other version.

Both versions of the worker.property file have a loadbalancer worker
defined:

First version:
worker.list=loadbalancer

worker.ajp13-01.port=11009
worker.ajp13-01.host=tomcathost
worker.ajp13-01.type=ajp13
worker.ajp13-01.lbfactor=1  <- important

worker.ajp13-02.port=11019
worker.ajp13-02.host=tomcathost
worker.ajp13-02.type=ajp13
worker.ajp13-02.lbfactor=0  <- important

worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=ajp13-01, ajp13-02

Second version:
worker.list=loadbalancer

worker.ajp13-01.port=11009
worker.ajp13-01.host=tomcathost
worker.ajp13-01.type=ajp13
worker.ajp13-01.lbfactor=0  <- important

worker.ajp13-02.port=11019
worker.ajp13-02.host=tomcathost
worker.ajp13-02.type=ajp13
worker.ajp13-02.lbfactor=1  <- important

worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=ajp13-02, ajp13-01


We just try to switch the lbfactor from 1 to 0 for the first Tomcat
and from 0 to 1 for the second Tomcat.
after the switch we do a graceful restart of apache.


but after this we still see new sessions beeing created on the first Tomcat
now with lbfactor=0!
Why?

Question: why does it state in the workers.properties that lbfactor must be
> 0 ?
should we set it to 0.000001 instead of 0?

Is this strategy completely nuts?
Is there a better way to accomplish this?


And yes, we need to fix our caching strategy ... but ...

Best regards,
Hans


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message