system.logに、以下のワーニングが大量に出力されます。 抑止する方法はありますか? -------------------The configured limit of 1,000 object references was reached while attempting to calculate the size of the object graph. Severe performance degradation could occur if the sizing operation co

 
【現象】
Cacheに格納される情報が大量に存在する場合に以下のログが出力されます。

-------------------

The configured limit of 1,000 object references was reached while attempting to calculate the size of the object graph.  

Severe performance degradation could occur if the sizing operation continues.  

This can be avoided by setting the CacheManger or Cache <sizeOfPolicy> elements maxDepthExceededBehavior to "abort" or adding stop points with @IgnoreSizeOf annotations.  

If performance degradation is NOT an issue at the configured limit, raise the limit value using the CacheManager or Cache <sizeOfPolicy> elements maxDepth attribute.  

For more information, see the Ehcache configuration documentation. 

------------------- 

【原因】 
EHCacheでは、キャッシュサイズ管理の為にキャッシュに登録された内容のサイズ計算を行います。 
この際、デフォルトで設定されている1000以上の参照を持つオブジェクトが存在する場合に発生します。 
これは、サイズ計算によるパフォーマンス低下の原因となる可能性があります。 

【回避策】
max-bytes-memory の代わりに、max-elements-on-memory を利用することにより、
警告が出力されなくなります。 

例えば、認可ポリシー設定キャッシュの格納数が増えたことにより発生している事象と考えられる場合は、
conf/im-ehcache-config/authz-policy.xml の max-bytes-memory を max-elements-on-memory 
に変更して頂ければ、本事象は抑止されます。 

ただし、max-bytes-memory を利用せず max-elements-on-memoryを利用した場合は、 
キャッシュ量に応じたキャッシュの破棄が行われずヒープ領域を膨大に利用する可能性があります。 

max-elements-on-memory に指定する値は、対象者の条件(サブジェクトグループ)の数としてください。 

サブジェクトグループごとのヒープの使用量については以下の「ポリシー設定のキャッシュ」の「キャッシュサイズの計算式」をご覧ください。 
https://www.intra-mart.jp/document/library/iap/public/im_authz/im_authz_specification/texts/appendix/im_ehcache_sizing.html

なお、EHCacheの設定として、sizeOfPolicy項目による制御が可能ですが、
 一般的なキャッシュ機構の設定では通常持たない設定であるため外部から設定値を変更する手段を提供していません。 

今後、sizeOfPolicyの設定を外部から受け渡す仕組みを提供するように検討いたします。

-- 対象 ------------------------------------------------------------------------
iAP/AccelPlatform/全アップデート
--------------------------------------------------------------------------------


FAQID:16
この記事は役に立ちましたか?
0人中0人がこの記事が役に立ったと言っています
Powered by Zendesk