File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes View the java heap at Runtime Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "View the java heap at Runtime " Watch "View the java heap at Runtime " New topic

View the java heap at Runtime

Arun Kumar
Ranch Hand

Joined: Jan 21, 2005
Posts: 133

Is there a view to analyse the java heap at runtime? with out creating teh heap dump files

We have run into a strange(?) issue,Our application is throwing OutOfMemeory error

OutOfMemoryError, cannot create any more threads due to memory or resource constraints

with this error no Heap dump is created as the possible cause i s Either not enough resources are available to create a new threads, or the C-runtime heap of the process (not the Java object heap) is full.

This error dosent occur frequently happens once in two weeks or so , hence we need a tool to look into the Heap at that particular point ,

any suggestions or pointers please

Nitesh Kant

Joined: Feb 25, 2007
Posts: 1638

You can do this using any profiler tool, eg: JProfiler.
BTW, if you are running on JDK 6, then you can use JVM option -XX:+HeapDumpOnOutOfMemoryError for automatically storing the heap dump when an OOM occurs.

apigee, a better way to API!
I agree. Here's the link:
subject: View the java heap at Runtime
It's not a secret anymore!