tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominik Stadler <dominik.stad...@dynatrace.com>
Subject PersistentManager with FileStore reports "persistentManager.swapInInvalid"
Date Wed, 06 Apr 2011 10:21:32 GMT
Hi,

We are using an embedded instance of Tomcat and would like to use a FileSto=
re for Session storage to keep memory requirements low while still allowing=
 to have many sessions opened. This is a single tomcat instance, sharing se=
ssions with other instances is not needed.

As I embed Tomcat, I have created the FileStore as follows:

  Context context =3D tomcat.addWebapp(contextRoot, webDir);

        tomcat.start();

        { // Override the default Manager and set a persistent manager whic=
h can store Sessions on disk
            PersistentManager manager =3D new PersistentManager();
              FileStore store =3D new FileStore();
              store.setDirectory(new File(workDir, "store").getAbsolutePath=
());
                  manager.setStore(store);
                  context.setManager(manager);
            manager.setMaxActiveSessions(-1);
            manager.setMaxIdleSwap(500);
            manager.setMinIdleSwap(200);
            manager.setMaxIdleBackup(400);
        }

As far as I understood documentation, this should allow me to have an unlim=
ited number of sessions (while the session timeout of 30 minutes still appl=
ies), but swaps out the sessions at least after 500 seconds.

It basically works fine this way, only a limited number of sessions are hel=
d in memory, others are swapped out. The only issue is that I start getting=
 the following log output frequently after aprox. half an hour when the fir=
st sessions are timing out:

2011-04-06 12:17:20 Custome SEVERE  [PersistentManagerBase] persistentManag=
er.swapInInvalid
2011-04-06 12:17:20 Custome SEVERE  [PersistentManagerBase] persistentManag=
er.swapInInvalid
2011-04-06 12:17:20 Custome SEVERE  [PersistentManagerBase] persistentManag=
er.swapInInvalid
2011-04-06 12:17:21 Custome SEVERE  [PersistentManagerBase] persistentManag=
er.swapInInvalid
2011-04-06 12:17:22 Custome SEVERE  [PersistentManagerBase] persistentManag=
er.swapInInvalid
2011-04-06 12:17:22 Custome SEVERE  [PersistentManagerBase] persistentManag=
er.swapInInvalid
2011-04-06 12:17:22 Custome SEVERE  [PersistentManagerBase] persistentManag=
er.swapInInvalid
2011-04-06 12:17:22 Custome SEVERE  [PersistentManagerBase] persistentManag=
er.swapInInvalid

When looking at the code in PersistentManager and StandardSession, I can no=
t explain what this severe-log tries to tell me. It seems we get this for e=
very session that is timing out after 30 minutes of inactivity. It seems th=
e expiry-check marks the session as "invalid" which in turn causes the chec=
k in swapIn() to fail.

Now my question:


-          As it seems to work nevertheless, can I safely ignore this error=
 message or does it indicate that I am doing something fundamentally wrong =
with PersistentManager and FileStore?


Thanks... Dominik

Dominik Stadler, Team Lead, R&D  dynaTrace<http://www.dynatrace.com/>, domi=
nik.stadler@dynatrace.com<mailto:dominik.stadler@dynatrace.com>  Skype: sta=
dler.dominik
dynaTrace<http://www.dynatrace.com/> >> Monitor. Resolve. Prevent. >> www.d=
ynatrace.com<http://www.dynatrace.com/> | blog.dynatrace.com<http://blog.dy=
natrace.com/>


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