'org.hibernate.cache.ReadWriteCache handleLockExpiry An item was expired by the cache while it was locked' Error Messages
プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。
このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
症状
[31/05/10 15:48:18:160 EST] 00000549 ReadWriteCache net.sf.hibernate.cache.ReadWriteCache handleLockExpiry An item was
expired by the cache while it was locked (increase your cache timeout): 75694677
[31/05/10 15:48:18:168 EST] 00000549 ReadWriteCache net.sf.hibernate.cache.ReadWriteCache handleLockExpiry An item was
expired by the cache while it was locked (increase your cache timeout): 75694676
原因
Confluence uses Ehcache to control its caching system. This library implements Soft locks by replacing a value with a special type that marks the element as locked, thus indicating to other threads to treat it differently to a normal element. An explanation from Ehcache documentation:
[The Soft Locks mechanism] is used in the Hibernate Read/Write strategy to force fall-through to the database during the two-phase commit - since we don't know exactly what should be returned by the cache while the commit is in process (but the db does).
If a soft-locked Element is evicted by the cache during the 2 phase commit, then once the 2 phase commit completes the cache will fail to update (since the soft-locked Element was evicted) and the cache entry will be reloaded from the database on the next read of that object. This is obviously non-fatal (we're a cache failure here so it should not be a problem).
The only problem it really causes would I imagine be a small rise in db load.
So, in summary the Hibernate messages are not problematic.
ソリューション
You can use the deterministic evictor to avoid this problem.
Specify the java -Dnet.sf.ehcache.use.classic.lru=true
system property to turn on classic LRU which contains a deterministic evictor. See Configuring System Properties for instructions.