This discussion is archived
2 Replies Latest reply: May 30, 2012 6:24 AM by 940584 RSS

OnOutOfMemoryError

user585822 Newbie
Currently Being Moderated
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

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points