Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to disable creating java heap dump after VM crashes?

JVM runs on FreeBSD with 18Gb memory. creating core file takes about hour, which is very slow, so i need some way to disable it.

like image 876
antony Avatar asked Oct 23 '25 21:10

antony


2 Answers

I'm not sure this will work, but if you're using the HotSpot VM, try this in the arguments to the java command:

-XX:HeapDumpPath=/dev/null

If you want to turn off core dumps altogether, you can use the ulimit approach (make sure to use the -H flag to set the hard limit):

ulimit -c -H 0
like image 148
Rob Heiser Avatar answered Oct 25 '25 09:10

Rob Heiser


If this is an OS crash dump then use ulimit to set the maximum core size to 0.

like image 41
caskey Avatar answered Oct 25 '25 09:10

caskey