[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Object reference limit warning after switching cache value to contain a ConcurrentHashMap  XML
Forum Index -> Ehcache
Author Message
bradleyw

master

Joined: 11/30/2009 14:39:53
Messages: 53
Offline

We recently made a change to our cache entries so they are now value objects composed of: 3 sets of Strings and 1 String

Previously, the Sets were simple HashSets. But we converted them to be ConcurrentHashMap-backed sets:

Code:
 Collections.newSetFromMap(new ConcurrentHashMap<String, Boolean>());
 


because we we were running into issues with multiple threads accessing these sets at once.

Since that change, we've been seeing the warning:

2014-05-16 10:59:48,928 WARN [ObjectGraphWalker] : 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.
 


We're running EhCache 2.8.2 and our cache configuration looks like:
Code:
 	<cache 
 		name="indexBlockRenderCache" 
 		maxBytesLocalHeap="100m"
 		eternal="true" 
 		overflowToOffHeap="false"
 		overflowToDisk="true" 
 		diskPersistent="false"
 		maxBytesLocalDisk="2G"
 		/>
 


I've breakpointed on this warning and looked at both the cache key and cache value to try to figure out how we could be hitting this warning and I can't figure it out.

Our key object:
Code:
 public class IndexBlockRenderCacheKey implements Serializable
 {
     private static final long serialVersionUID = 8527160051856966360L;
     private final String id;
     private final boolean isContent;
 
     // if isContent is true, the following flags do not matter
     private final boolean indexRegularContent;
     private final boolean indexSystemMetadata;
     private final boolean indexUserMetadata;
     private final boolean indexAccessRights;
     private final boolean incldueWorkflowInformation;
 ....
 


Our value object:
Code:
 public class IndexBlockRenderCacheValue implements Serializable
 {
     private static final long serialVersionUID = 4153994794523856780L;
     private final Set<String> includedIndexBlockIds;
     private final Set<String> includedAssetIds;
     private final Set<String> includedStructuredDataAssetIds;
     private final String jdomElementAsString;
 ...
 


The sets of Strings all appear to be empty so I can't figure how we'd be anywhere close to the 1000 object reference limit.

Any ideas here? Is there an issue with computing the size of ConcurrentHashMap-backed sets?
 
Forum Index -> Ehcache
Go to:   
Powered by JForum 2.1.7 © JForum Team