Heap Dump Location with HeapDumpOnOutOfMemoryError Parameter
When the -XX: HeapDumpOnOutOfMemoryError parameter is added to JBoss start-up options, it triggers the creation of a heap dump in the event of an out-of-memory error. To understand where this data is dumped:
Default Location:
By default, the heap dump is generated in a file named java_
Custom Location:
You can specify an alternative location for the heap dump using the -XX:HeapDumpPath= option. By setting this option to a directory, such as -XX:HeapDumpPath=/disk2/dumps, you can ensure that the heap dump is saved in the specified directory.
Console Output:
The heap dump is not directly printed to the console. Instead, it is written to the specified file.
Accessing the Dump when Not Logged in:
If you're not logged into the server through the console, you can access the dump file by connecting to the server using SSH or another remote connection tool and navigating to the directory where it's located. The java_
The above is the detailed content of Where does the heap dump get saved when using the -XX: HeapDumpOnOutOfMemoryError parameter?. For more information, please follow other related articles on the PHP Chinese website!