0

I'm using JBoss 7.1.1 and i have deployed 4 apps(.war), now the issue is after some time the Java ran out of memory. I don't know which app should have memory leak.

My question is is there a way to restrict the memory to each app or i can find which app is using max memory ?

Nomi Khurram
  • 101
  • 1
  • 11
  • JMAP would give you a heap dump which ought to help you - see http://stackoverflow.com/questions/15130956/how-to-analyse-the-heap-dump-using-jmap-in-java – Mike Palfrey Nov 25 '15 at 15:36
  • You should take a java heap dump (enable the `-XX:+HeapDumpOnOutOfMemoryError` flag). Once you have the heap dump, open it using a tool like [MAT](https://eclipse.org/mat/). You probably want to start at `histogram` and `dominator tree`. This will give you an idea about which objects are taking up the heap and then you can figure out how to either optimize the code or add more memory. – CoolBeans Nov 25 '15 at 15:38

0 Answers0