简体   繁体   中英

Limiting the number of java core and heap dumps

Many times my java process is crashing with Java Cores and Heap Dumps.

When that happens, the resulting core files fill up my File System.

So, we need to periodically remove them to not fill up the File system.

Is there any way of limiting the size of heap or javacore?

More importantly, is there a way to make sure previous java core is overwritten by another core file Like a rollover mechanism(log4j) for Java process cores?

Thanks, Sashi

If -XX:+HeapDumpOnOutOfMemoryError is present in your application, the heap dump is getting generated because your application is asking it to get generated on OOM. If you don't want that, remove the argument. But, that will not fix your actual problem for sure.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM