0 votes
1 view
ago in Java by (2.6k points)

I have a production server running with the following flag: -XX:+HeapDumpOnOutOfMemoryError

Last night it generated a java-38942.hprof file when our server encountered a heap error. It turns out that the developers of the system knew of the flag but no way to get any useful information from it.

Any ideas?

1 Answer

0 votes
ago by (26.5k points)

If you require a reasonably advanced tool to do some grave poking around, look at the Memory Analyzer project at Eclipse, presented to them by SAP.

Some of what you can do is mind-blowingly ideal for detecting memory leaks etc -- including operating a sort of limited SQL (OQL) against the in-memory objects, i.e.

SELECT toString(firstName) FROM com.yourcompany.somepackage.User

Totally amazing.

...