how to disable creating java heap dump after VM crashes?

后端 未结 3 1554
礼貌的吻别
礼貌的吻别 2021-01-21 00:21

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.

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-21 01:04

    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
    

提交回复
热议问题