You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Josh Gooding <jo...@gmail.com> on 2013/01/30 03:42:08 UTC

Scenario with Tomcat cluster session management

As usual, I am always working with Tomcat to tweak every ounce of "oomph"
out of it and I ran across this scenario in my configuration trials.

At present, I have a small 3 server tomcat cluster running 7.0.30 64-bit on
CentOS, and jdk6.  I want to move the project from having to use kill -9
(for session persistence) during an update and manual intervention, to
automated parallel deployment's and war farming.

>From the testing I have done, if I use the manager to undeploy and then
redeploy the context, it seems to call destroySession on all the sessions
across the cluster, not just the node that is being "worked on".  Is this
correct or am I missing something?

Is there presently a way to undeploy a context WITHOUT tomcat destroying
the sessions and not use kill -9?  IMO, using kill -9 seems a bit hacky.

- Josh

Re: Scenario with Tomcat cluster session management

Posted by Konstantin Kolinko <kn...@gmail.com>.
2013/1/30 Josh Gooding <jo...@gmail.com>:
> As usual, I am always working with Tomcat to tweak every ounce of "oomph"
> out of it and I ran across this scenario in my configuration trials.
>
> At present, I have a small 3 server tomcat cluster running 7.0.30 64-bit on
> CentOS, and jdk6.  I want to move the project from having to use kill -9
> (for session persistence) during an update and manual intervention, to
> automated parallel deployment's and war farming.
>
> From the testing I have done, if I use the manager to undeploy and then
> redeploy the context, it seems to call destroySession on all the sessions
> across the cluster, not just the node that is being "worked on".  Is this
> correct or am I missing something?
>
> Is there presently a way to undeploy a context WITHOUT tomcat destroying
> the sessions and not use kill -9?  IMO, using kill -9 seems a bit hacky.
>

1. Where your session information is stored?

In the default configuration (without a cluster) it is stored in the
"work" directory of an application. That directory is deleted when an
application is undeployed.

What is your configuration?

2. You can stop a web application. That should not delete sessions.

If you are going to reconfigure a stopped application, beware of autodeployment.
There is a JMX method that is used by the Manager webapp to mark an
application as "serviced" so that autodeployment do not interfere.

3. Why "kill"? There are ways to shutdown Tomcat gracefully.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org