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

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

atlassian-bitbucket.log に次のメッセージが表示される。

2012-10-10 09:16:59,516 WARN  [scheduler_Worker-5] n.s.e.h.s.AbstractReadWriteEhcacheAccessStrategy Cache com.atlassian.crowd.model.user.InternalUser.credentialRecords Key com.atlassian.crowd.model.user.InternalUser.credentialRecords#4718627 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

2012-10-10 09:17:00,686 WARN  [scheduler_Worker-5] n.s.e.h.s.AbstractReadWriteEhcacheAccessStrategy Cache com.atlassian.crowd.model.user.InternalUser Key com.atlassian.crowd.model.user.InternalUser#4423730 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

原因

A soft-locked cache entry expired. These warning are known behavior in Bitbucket Server and tend to happen when the Crowd user management component syncs with an external user directory and cycles through all the users quickly (thus evicting some users that may be needed in other requests operating at the same time). If you ignore these warnings then Bitbucket Server will need to do make some extra calls to the database to retrieve user information. We do not believe these extra database calls would materially impact the performance of your Bitbucket Server instance.

ソリューション

Bitbucket Server 3.2+ no longer uses Ehcache. The default limit for the new caching framework is 2000 for both InternalUser and InternalUser.credentialRecords.

Increase the Ehcache maxElementsInMemory limit to get rid of the WARNs:

  1. Edit the file bitbucket-1.3.00/atlassian-bitbucket/WEB-INF/classes/ehcache.xml inside the Bitbucket Server Installation Directory
  2. Locate the following classes: com.atlassian.crowd.model.user.InternalUser.credentialRecords and com.atlassian.crowd.model.user.InternalUser
<cache name="com.atlassian.crowd.model.user.InternalUser.credentialRecords"
           eternal="false"
           maxElementsInMemory="500" --> "1000"
           timeToIdleSeconds="1800"
           timeToLiveSeconds="1800"
           overflowToDisk="false"
           memoryStoreEvictionPolicy="LFU"/>

<cache name="com.atlassian.crowd.model.user.InternalUser"
           eternal="false"
           maxElementsInMemory="500" --> "1000"
           timeToIdleSeconds="1800"
           timeToLiveSeconds="1800"
           overflowToDisk="false"
           memoryStoreEvictionPolicy="LFU"/>

(info) So basically the values are 500 and we are changing them to 1000 - restart Bitbucket Server and that should make the WARNs to disapear from the logs.

Last modified on Mar 30, 2016

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.