On Mon, 25 Apr 2011 09:40:59 +0100, Guillaume Favier wrote:
Hi,
I have 2 tomcat 5.5 server. Each of them handling a set (50+) of
third party
webapps name /ABC* and /DEF*.
Each of these webapp is quite memory consumming when started (more
than
300M).
I would like all connection to ABC* webapps be handled by tomcat
server 1,
and connection to webapps DEF* to be handled by tomcat server 2.
My objectives are :
* server 1 to be failover of server2 and server2 failover of server1.
* any webapp should be instanciate on only one server otherwise it
might
trigger a memory overload
So I set up my httpd.conf as is :
JkWorkersFile "conf/worker.properties"
JkOptions +ForwardKeySize +ForwardURICompat
and my worker.properties as is :
worker.list = failover
# ------------------------
# template
# ------------------------
worker.template.type=ajp13
worker.template.lbfactor=1
worker.template.connection_pool_timeout=600
worker.template.socket_timeout=1000
worker.template.fail_on_status=500
# ------------------------
# tomcat1
# ------------------------
worker.tomcat1.reference=worker.template
worker.tomcat1.port=9001
worker.tomcat1.host=localhost
worker.tomcat1.mount=/ABC* /ABC/*
worker.tomcat1.redirect=failover
# ------------------------
# tomcat2
# ------------------------
worker.tomcat2.reference=worker.template
worker.tomcat2.port=9002
worker.tomcat2.host=localhost
worker.tomcat1.mount=/DEF* /DEF/*
^ is this correct or a typo?
worker.tomcat2.redirect=failover
# ------------------------
# failover
# ------------------------
worker.failover.type=lb
worker.failover.balance_workers=tomcat1,tomcat2
The jvmroute is set in both server.xml.
Previously I had put the jkMount directive in httpd.conf, but I
could'nt
make the failover work. So I move it in the worker.properties.
Tomcat doesn't seem to take into account the jkmount directive from
the
worker.properties : a webapp is started indifrently on any server.
Tomcat starts all webapps it can find, not only those you specified by
a jk mount. Servlets will
only start, if you specify a startup order, or trigger a request to a
servlet.
So I don't think it is possible to prevent a webapp from starting in
the "failover" tomcat. But it
should be possible to limit its memory footprint.
That said, I find it strange, that you define a special failover worker
instead of a direct redirect like
worker.tomcat1.redirect=tomcat2
worker.tomcat2.redirect=tomcat1
Bye
Felix
I must say i am quite stuck here. Would anyone get an idea ?
regards
gui
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org