java
Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 14-04-2009, 07:21
kjkoster kjkoster is offline
Forum Operator
 
Join Date: Jul 2008
Posts: 1,123
Default dump heap on OutOfMemoryError

Dear All,

The HotSpot JVM has a very useful command line flag: –XX:+HeapDumpOnOutOfMemoryError. As the name suggests, this flag makes Java automatically dump its heap memory on an OutOfMemoryError.

This flag is great for systems that bomb out when you are sleeping. In the morning you'll not only find the exception in the logs, but also an nice, fat heap dump to throw your analysis tools at.

This flag may not be so great to use when you run your JVM with a very large heap. Dumping a help that is more than a few GB may take quite some time.

Kees Jan
Reply With Quote
  #2  
Old 16-04-2009, 13:18
Barry Barry is offline
Moderator
 
Join Date: Jul 2008
Posts: 106
Default

We have a process that goes boom once in a blue moon with a total heap of about 5GB

Fortunately the latest Netbeans Milestones for 6.7 include query functionality for the heapwalker:
"OQL support for heapwalker
Now it is possible to use jHat compatible OQL queries to analyze the contents of the heapdump. The OQL support offers a basic syntax and keyword highlighting, code completion for OQL keywords and the class names on the heap and the query results are integrated with the rest of the heapwalker. "
Reply With Quote
  #3  
Old 16-04-2009, 13:22
kjkoster kjkoster is offline
Forum Operator
 
Join Date: Jul 2008
Posts: 1,123
Default

Dear Barry,

How well does Netbeans cope with dumps of 5GB heaps? How much RAM do you need in your machine to be able to analyse such a heap dump?

Kees Jan
Reply With Quote
  #4  
Old 16-04-2009, 13:36
Barry Barry is offline
Moderator
 
Join Date: Jul 2008
Posts: 106
Default

That's what I'm hoping to find out next time ;-)
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump