tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Kennedy <>
Subject help with session replication using PersistentManager and FileStore
Date Tue, 03 Oct 2006 20:46:36 GMT
We have a load balancer and several Tomcat instances.  Currently this
"cluster" uses sticky sessions, ie. the load balancer routes the
request to the Tomcat instance holding the session which belongs to the
request.  The goal is to change our configuration so that all sessions
are persisted to a shared network filesystem, thus allowing non-sticky
sessions -- ie. any tomcat instance can handle a request.

The Overview section of the Tomcat 5.5 Clustering/Session Replication HOW-TO (
suggests that this configuration is possible: "1. Using session
persistence, and saving the session to a shared file system
(PersistenceManager + FileStore)".

I've tried the following Manager config:

  <Manager className="org.apache.catalina.session.PersistentManager"
    <Store className="org.apache.catalina.session.FileStore" directory="sessions"/>

maxIdleBackup=0 because we want the session to become instantly eligible for persisting to
the store, 
maxIdleSwap=0 to have it persisted right after last access, minIdleSwap=0 (similarly).

this configuration, the session is still not persisted immediately,
instead it seems to occur a minute or so later.  If a new request for
the same session is routed by the load balancer to another Tomcat, and
the original Tomcat still hasn't persisted it to the filesystem, then
the new request will get an old copy of the session or none at all.

Have I misunderstood something here?  


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message