Note that there are some explanatory texts on larger screens.

plurals
  1. POGetting java heap space error when using ehcache with terracotta
    text
    copied!<p>I am trying to use terracotta with ehcache. My project setup is like i am using 2 instances of tomcat where my application integrated with ehcache is deployed. I need synchronization between these two instances that's why i am using terracotta. However I am facing error</p> <p>"net.sf.ehcache.CacheException: Uncaught exception in get() - Java heap space " when i have integrated ehcache with terracotta. My ehcache.xml is</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;ehcache name="terracotta" maxBytesLocalHeap="30%" &gt; &lt;diskStore path="java.io.tmpdir" /&gt; &lt;terracottaConfig url="localhost:9510"/&gt; &lt;cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"/&gt; &lt;cache name="LocalCache" timeToLiveSeconds="10" maxElementsOnDisk="0" eternal="false" memoryStoreEvictionPolicy="LFU" &gt; &lt;terracotta /&gt; &lt;/cache&gt; &lt;cache name="cache1" timeToLiveSeconds="10" maxElementsOnDisk="0" eternal="false" memoryStoreEvictionPolicy="LFU" &gt; &lt;terracotta /&gt; &lt;/cache&gt; &lt;cache name="cache2" timeToLiveSeconds="10" maxElementsOnDisk="0" eternal="false" memoryStoreEvictionPolicy="LFU" &gt; &lt;terracotta /&gt; &lt;/cache&gt; &lt;cache name="cache3" timeToLiveSeconds="10" maxElementsOnDisk="0" eternal="false" memoryStoreEvictionPolicy="LFU" &gt; &lt;terracotta /&gt; &lt;/cache&gt; &lt;cache name="cache4" timeToLiveSeconds="10" maxElementsOnDisk="0" eternal="false" memoryStoreEvictionPolicy="LFU" &gt; &lt;terracotta /&gt; &lt;/cache&gt; &lt;cache name="cache5" timeToLiveSeconds="10" maxElementsOnDisk="0" eternal="false" memoryStoreEvictionPolicy="LFU" &gt; &lt;terracotta /&gt; &lt;/cache&gt; &lt;cache name="cache6" timeToLiveSeconds="10" maxElementsOnDisk="0" eternal="false" memoryStoreEvictionPolicy="LFU" &gt; &lt;terracotta /&gt; &lt;/cache&gt; &lt;cache name="cache7" timeToLiveSeconds="10" maxElementsOnDisk="0" eternal="false" memoryStoreEvictionPolicy="LFU" &gt; &lt;terracotta /&gt; &lt;/cache&gt; &lt;cache name="cache8" timeToLiveSeconds="10" maxElementsOnDisk="0" eternal="false" memoryStoreEvictionPolicy="LFU" &gt; &lt;terracotta /&gt; &lt;/cache&gt; &lt;cache name="cache9" timeToLiveSeconds="10" maxElementsOnDisk="0" eternal="false" memoryStoreEvictionPolicy="LFU" &gt; &lt;terracotta /&gt; &lt;/cache&gt; &lt;cache name="cache10" timeToLiveSeconds="10" maxElementsOnDisk="0" eternal="false" memoryStoreEvictionPolicy="LFU" &gt; &lt;terracotta /&gt; &lt;/cache&gt; &lt;cache name="DetailStockByKey" timeToLiveSeconds="10" maxElementsOnDisk="0" eternal="false" memoryStoreEvictionPolicy="LFU" &gt; &lt;terracotta /&gt; &lt;/cache&gt; &lt;cache name="cache11" timeToLiveSeconds="10" maxElementsOnDisk="0" eternal="false" memoryStoreEvictionPolicy="LFU" &gt; &lt;terracotta /&gt; &lt;/cache&gt; &lt;cache name="cache12" timeToLiveSeconds="10" maxElementsOnDisk="0" eternal="false" memoryStoreEvictionPolicy="LFU" &gt; &lt;terracotta /&gt; &lt;/cache&gt; &lt;cache name="cache13" timeToLiveSeconds="10" maxElementsOnDisk="0" eternal="false" memoryStoreEvictionPolicy="LFU" &gt; &lt;terracotta /&gt; &lt;/cache&gt; &lt;cache name="cache15" timeToLiveSeconds="10" eternal="false" memoryStoreEvictionPolicy="LFU" &gt; &lt;!--&lt;terracotta /&gt; --&gt; &lt;/cache&gt; &lt;cache name="cache14" timeToLiveSeconds="10" eternal="false" memoryStoreEvictionPolicy="LFU" &gt; &lt;!--&lt;terracotta /&gt; --&gt; &lt;/cache&gt; &lt;/ehcache&gt; </code></pre> <p>I also getting a warning like</p> <blockquote> <p>WARNING: 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 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 elements maxDepth attribute. For more information, see the Ehcache configuration documentation.</p> </blockquote> <p>And i am using -Xmx:1024m for running terracotta. I dint face this problem and also my response time is less when running standalone ehcache.xml. However when using ehcache with terracotta response time has been increased by 700 times. Please help in resolving this issue. What should i do so that response time decreases and i wont face this error again. Thanks in advance</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload