Problems with: A soft-locked cache entry was expired by the underlying Ehcache

MatBanik picture MatBanik · Jan 2, 2011 · Viewed 7.9k times · Source

I'm getting following warning and I have no idea what to do about it. There is about 80000 entries that write this warning into catalina.out log file in tomcat every time the bannedIPs are getting updated:

WARNING: Cache package.BannedIP Key package.BannedIP#73121 Lockable : null
A soft-locked cache entry was expired by the underlying Ehcache. If this happens regularly   you should consider increasing the cache timeouts and/or capacity limits
Dec 16, 2010 10:00:53 PM net.sf.ehcache.hibernate.strategy.AbstractReadWriteEhcacheAccessStrategy handleLockExpiry

The configuration for BannedIP in ehcache.xml file:

    <cache name="package.BannedIP"
       maxElementsInMemory="80000"
       eternal="true"
       overflowToDisk="true"
       diskPersistent="true" />

Any help will be appreciated.

Answer

javamonkey79 picture javamonkey79 · Jan 2, 2011

Are you experiencing any performance or usability problems as a result of this warning? If not then it seems like you should treat this warning as just that: a warning.

Otherwise, it looks like the solution is to increase the size of maxElementsInMemory to account for the difference in what is cached versus what is realistically being used.

Hope this helps.