tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alessandro Colantoni <>
Subject session expires dealing with big objects
Date Wed, 16 Nov 2005 15:58:15 GMT
Hi all.

Some times my session expires wrongly when I deal with a bean very big.
My bean is a Struts form bean.
I didn't touch conf/server.xml and conf/web.xml of tomcat distribution
In my web.xml I put

I've done such a file context.xml:

<Context  path="/trayectorias" docBase="trayectorias"
relodable="false" crossContext="true" privileged="true" debug="99">

<!-- PersistentManager: Uncomment the section below to test Persistent

              saveOnRestart: If true, all active sessions will be saved
                to the Store when Catalina is shutdown, regardless of
                other settings. All Sessions found in the Store will be
                loaded on startup. Sessions past their expiration are
                ignored in both cases.
              maxActiveSessions: If 0 or greater, having too many active
                sessions will result in some being swapped out. minIdleSwap
                limits this. -1 or 0 means unlimited sessions are allowed.
                If it is not possible to swap sessions new sessions will
                be rejected.
                This avoids thrashing when the site is highly active.
              minIdleSwap: Sessions must be idle for at least this long
                (in seconds) before they will be swapped out due to
                0 means sessions will almost always be swapped out after
                use - this will be noticeably slow for your users.
              maxIdleSwap: Sessions will be swapped out if idle for this
                long (in seconds). If minIdleSwap is higher, then it will
                override this. This isn't exact: it is checked periodically.
                -1 means sessions won't be swapped out for this reason,
                although they may be swapped out for maxActiveSessions.
                If set to >= 0, guarantees that all sessions found in the
                Store will be loaded on startup.
              maxIdleBackup: Sessions will be backed up (saved to the Store,
                but left in active memory) if idle for this long (in seconds),
                and all sessions found in the Store will be loaded on startup.
                If set to -1 sessions will not be backed up, 0 means they
                should be backed up shortly after being used.

              To clear sessions from the Store, set
maxActiveSessions, maxIdleSwap,
              and minIdleBackup all to -1, saveOnRestart to false, then restart
         <Manager className="org.apache.catalina.session.PersistentManager"
               <Store className="org.apache.catalina.session.FileStore"/>
       <Manager className="org.apache.catalina.session.StandardManager"
           pathname =""
   <ResourceLink name="users" global="UserDatabase"
   <Realm className="org.apache.catalina.realm.MemoryRealm"


Previously I had tried with PersistentManager, and with tomcat 4.1.24,
5.5.0 y 5.5.7
The session expires wrongly only with big object.
I tried it in different computers and I notice that smaller is PC mas
frequently happens the error.

Have I configured something wrong?
Is it possible I have to configure some parameter to swap?
Is it possible to configure session size in some way?

Thanks a lot in advance

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message