JAVA/OOM: How to dump all information on java heap space when it crashes due to OOM?

Viewed 2682

I am a newbie on JAVA. I run a program on top of distributed framework implemented in JAVA.

When I use large data, the program crashes due to OutOfMemory with some error stacks. But the error stacks do not contain the information that I am looking for.

I want to check what kinds of data structures (java objects) were consuming the heap space at the time when it crashed.

Is there any well-known tricks, methods, or tools for it?

Thanks,

1 Answers
Related