tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Cicimov <>
Subject Re: Tuning session replication on clusters
Date Wed, 05 Sep 2012 23:59:44 GMT
On Thu, Sep 6, 2012 at 5:51 AM, <> wrote:

> I have a small cluster of 3 nodes running tomcat 6.0.24 with openJDK
> 1.6.0_20 on Ubuntu 10.04 LTS.
> I have roughly 5,000-6,000 sessions at any given time, and when I restart
> one of the nodes I am finding that not all sessions are getting
> replicated , even when I have the state transfer  timeout set to 60
> seconds.
> It seems that only sessions that have been touched recently are replicated,
> even if the session is still otherwise valid. I did one test where I
> created about 1,500 sessions and then took out one node, When I brought it
> back online, it only replicated the 4-5 sessions that were from active
> users on the test cluster. It did not replicated the idle sessions that
> were still valid that my prior test had created.
> I  am wanting to tune my settings, but I am unsure where would be the best
> place to start. Should I start with the threads available to the NIO
> Receiver, or would I be better off focusing on a different set of
> attributes first, such as the send or receive timeout values?
> Any tips or pointers as to which setting might be the most productive would
> be greatly appreciated.
> Lee Lowder
> O'Reilly Auto Parts
> Web Systems Administrator
> (417) 862-2674 x1858
> This communication and any attachments are confidential, protected by
> Communications Privacy Act 18 USCS ยง 2510, solely for the use of the
> intended recipient, and may contain legally privileged material. If you are
> not the intended recipient, please return or destroy it immediately. Thank
> you.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
For starter does your cluster satisfy the requirements bellow?

To run session replication in your Tomcat 6.0 container, the following
steps should be completed:

   - All your session attributes must implement
   - Uncomment the Cluster element in server.xml
   - If you have defined custom cluster valves, make sure you have the
   ReplicationValve defined as well under the Cluster element in server.xml
   - If your Tomcat instances are running on the same machine, make sure
   the tcpListenPort attribute is unique for each instance, in most cases
   Tomcat is smart enough to resolve this on it's own by autodetecting
   available ports in the range 4000-4100
   - Make sure your web.xml has the <distributable/> element
   - If you are using mod_jk, make sure that jvmRoute attribute is set at
   your Engine <Engine name="Catalina" jvmRoute="node01" > and that the
   jvmRoute attribute value matches your worker name in
   - Make sure that all nodes have the same time and sync with NTP service!
   - Make sure that your loadbalancer is configured for sticky session mode.

Also you don't say what are you using for load balancing? Not bad to post
your cluster definition as well.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message