title: Memory leak issue due to EHCache
body: <p>I am facing memory leak issue in my performance environment due to EhCache with below configuraiton:</p>
  
  <pre><code>&lt;cache name="mycache"
              maxElementsInMemory="50000"
              eternal="false"
              timeToIdleSeconds="300"
              timeToLiveSeconds="0"
              overflowToDisk="false"
              diskPersistent="false"
              memoryStoreEvictionPolicy="LRU"
              /&gt;                
  </code></pre>
  
  <p>I took the heap dump and trying to analyze the cause of leak using IBM Heap Analyzer. IBM Heap analyzer suspected memory leak with below information:</p>
  
  <pre><code>Leak suspect:   576,690,536 bytes (83.16 %) of Java heap is used by 128 instances of net/sf/ehcache/store/chm/SelectableConcurrentHashMap$Segment
  Contains an instance) of the leak suspect: - org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBean holding 117,109,616 bytes at 0x1b6fb410
  
  Total size: 576,690,536 bytes
  
  Size:   528 bytes
  </code></pre>
  
  <p>My object (which is stored in ehcache) size is 88 bytes.</p>
  
  <p>With this information I am not able to understand what can be the actual cause of memory leak in this case.</p>
  
  <p>Are my objects not being flushed/removed from cache?
  Is there any thing odd in my ehcache configuration?
  If object is not being removed from cache, what can be the reason?</p>
  
  <p>Any Idea?</p>