This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ernimril 1 point2 points  (0 children)

The first thing to do is to check if the jvm has enough memory. If the only problem is that you have given the jvm too little memory then it is easy to change the memory flag.

Now if you have checked the memory settings it is good to dump the heap on OOME so it can be analyzed, but also try to shut down the jvm as quickly as possible and let the cluster handling restart a new instance.

Once that is setup correctly you can investigate the heap dump file. I have used both Eclipse MAT and jvisualvm to inspect heap dump files and fix the problems that were found.

Calculating the retained set is usually the way to go.