2

Because of a Java Heap Space error I did a heap dump of my Java EE 7 program running on a WildFly 9 server. Then I used Eclipse Memory Analyser to analyse the dump. Eclipse Memory Analyser reveals the 2 following problems which are the same:

One instance of "org.jboss.as.ejb3.component.stateful.StatefulSessionComponent" loaded by "org.jboss.modules.ModuleClassLoader @ 0xe0130378" occupies 168 975 304 (36,60%) bytes. The memory is accumulated in one instance of "java.util.concurrent.ConcurrentHashMap$Node[]" loaded by "".

One instance of "org.jboss.as.ejb3.component.stateful.StatefulSessionComponent" loaded by "org.jboss.modules.ModuleClassLoader @ 0xe0130378" occupies 155 775 312 (33,74%) bytes. The memory is accumulated in one instance of "java.util.concurrent.ConcurrentHashMap$Node[]" loaded by "".

I have few Stateful EJBs on my program. Does that mean those EJBs are never garbage collected ? Any idea how to solve this problem ?

EDIT

Here a capture of the dominator tree: Dominator tree It seems that the class java.util.concurrent.ConcurrentHashMap$Node is the cause.

Community
  • 1
  • 1
cheb1k4
  • 2,316
  • 7
  • 26
  • 39
  • what does the concurrentHashMap hold deos it hold some session objects? – Vikas Madhusudana May 26 '16 at 11:51
  • The `ConcurrentHashMap$Node` holds 3 entries. One of them is `org.jboss.ejb.client.UnknownSessionID`. There are also a `org.jboss.as.ejb3.cache.simple.SimpleCache$Entry` and another `java.util.concurrent.ConcurrentHashMap$Node`. – cheb1k4 May 26 '16 at 13:43
  • I think you have to set the timeout of ejb sessions properly check this link https://developer.jboss.org/wiki/HowDoTheTimeoutsWorkWithEJB3StatefulBeans?_sscc=t – Vikas Madhusudana May 26 '16 at 14:52

0 Answers0