Hello,
I have posted previously but am in desperate need of help so I have posted
again. In our shiro-ehcache folder the file shiro-activeSessionCache.data
has grown to almost 2GB in one day. I have configured it to write to
another location with more space but the file keeps getting bigger everyday.
We have not had any problems with this before and I am unclear why the cache
is being written to disk. We are in need of any help and it would be
greatly appreciated. Thank you.
These are the settings for our Shiro session cache in our ehcache.xml file:
<cache name="shiro-activeSessionCache"
maxElementsInMemory="10000"
overflowToDisk="true"
eternal="true"
timeToLiveSeconds="0"
timeToIdleSeconds="0"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="600"
>
</cache>
We have configured programmatically like this:
public static void initSecurityManager() {
//Set realms
mSecurityManager = new DefaultSecurityManager();
mSecurityManager.setAuthenticator(new
MockAuthenticator());
ArrayList <Realm> realms = new ArrayList<Realm>();
realms.add(new PortalRealm());
realms.add(new PortalBaselineRealm());
mSecurityManager.setRealms(realms);
//Setup caching
SessionDAO sessionDAO = new EnterpriseCacheSessionDAO();
((DefaultSessionManager)mSecurityManager.getSessionManager()).setSessionDAO(sessionDAO);
EhCacheManager shiroCacheManager = new EhCacheManager();
shiroCacheManager.setCacheManagerConfigFile("classpath:ehcache.xml");
mSecurityManager.setCacheManager(shiroCacheManager);
SecurityUtils.setSecurityManager(mSecurityManager);
}
--
View this message in context:
http://shiro-user.582556.n2.nabble.com/Help-needed-shiro-activeSessionCache-data-grows-close-to-2GB-daily-tp7579231.html
Sent from the Shiro User mailing list archive at Nabble.com.