问题:底层的Ehcache使软锁高速缓存条目到期 [英] Problems with: A soft-locked cache entry was expired by the underlying Ehcache
问题描述
我收到警告,但不知道该怎么办。每次更新bannedIP时,大约有80000个条目将此警告写入tomcat的catalina.out日志文件:
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
ehcache.xml文件中BannedIP的配置:
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.
推荐答案
由于此警告,您是否遇到任何性能或可用性问题?如果不是这样,则似乎您应该将此警告视为:警告。
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.
否则,解决方案似乎是增加 maxElementsInMemory
的大小以解决差异缓存与实际使用的缓存相比。
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.
希望这会有所帮助。
这篇关于问题:底层的Ehcache使软锁高速缓存条目到期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!