Did it run out of memory? You can get heap dumps when OutOfMemoryException happens and you can inspect with tools like Eclipse MAT.
Yes, I have analyzed with Jconsole but,I can't see infinispan how many used heap memory , totally my cache have 6 keys and add millions items to them, may be problem for this archtitecture?
my code as below:
Cache<String,Queue<T>> infinispanCache = new ConcurrentLinkedQueue<>();
Totally my cache have 6 keys and add millions items to them same above example and Poll item in another threads.
After several minutes jboss reached to max heap.
new ConcurrentLinkedQueue<>(); was my typo , i means new Cache for it's data type
1 of 1 people found this helpful
^ to standalone.conf
I analyzed heap dump with eclipse mat and get memory leaks as below
One instance of "org.infinispan.container.DefaultDataContainer" loaded by "org.jboss.modules.ModuleClassLoader @ 0x80c08270" occupies 295,314,008 (17.81%) bytes. The memory is accumulated in one instance of "org.infinispan.commons.util.concurrent.jdk8backported.EquivalentConcurrentHashMapV8$Node"loaded by "org.jboss.modules.ModuleClassLoader @ 0x80d338a8".
org.jboss.modules.ModuleClassLoader @ 0x80c08270
org.jboss.modules.ModuleClassLoader @ 0x80d338a8
I increase number of cache and i have 5 cache , and I get same result
Also, i only way to avoid this memory increase max heap size?
Hmm, maybe you just need more memory for the data you're using? If you don't need all the data, you could always set expiration for the data and eviction.