I am trying to debug an OutOfMemoryError we are getting on Web application which is based on Spring Web flow + Hibernate + c3p0 connection pool.
I am using Jmeter to simulate the load of 5 concurrent users on this system and withing 5 minutes the applications runs out of memory with below message.
java.lang.OutOfMemoryError:
Java heap space
Exception in
thread "http-8080-3" java.lang.OutOfMemoryError: Java heap space
The applications is not doing much processing so I assume so much memory is not required for it.
I am using JProfiler to do application profiling, but I am kind of new to it so may be any suggestions on a good profiling tool are also welcome.
Looking at the object allocations I see there are too many objects of java.util.concurrent.ConcurrentHashMap and its inner classes. See the attached image with JProfiler report.
Let me know what could be the possible reason for this. I am open to any ideas you have.
On Production we are running this application with 1.5GB JAva Heap space and it runs out of memory within 2-3 days.