Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

OnOutOfMemoryError

user585822-OracleApr 11 2012 — edited May 30 2012
Hi All ,
I have a situation where we get an OutOfMemory error. I want to create a thread dump when that condition occurs.
I was thinking of going with the following java startup parameter
-XX:OnOutOfMemoryError="kill -3 pid"

-verbose:gc -Xmx1024M -Xms512M -XX:MaxPermSize=128M -XX:NewRatio=2 -XX:+PrintGCTimeStamps -XX:+UseTLAB -XX:+PrintGCDetails -XX:+PrintClassHistogram -XX:+HeapDumpOnOutOfMemoryError -XX:OnOutOfMemoryError="kill -3 pid"

Will that work? Will it grab the pid automatically or do I need to supply it?

thanks and regards
Jason

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 27 2012
Added on Apr 11 2012
2 comments
3,240 views