What are hs_err_pid.log files generated when Tomcat crashes?

JavaTomcatCrashJvm

Java Problem Overview


Are any specific settings required on the Java tab of Tomcat configuration tool in order to generate a hs_err_pid.log file?

What is the default location of the hs_err_pid.log file? Can this location be changed?

Java Solutions


Solution 1 - Java

A very very good document regarding this topic is Troubleshooting Guide for Java from (originally) Sun. See the chapter "Troubleshooting System Crashes" for information about hs_err_pid* Files.

See Appendix C - Fatal Error Log

Per the guide, by default the file will be created in the working directory of the process if possible, or in the system temporary directory otherwise. A specific location can be chosen by passing in the -XX:ErrorFile product flag. It says:

> If the -XX:ErrorFile= file flag is not specified, the system attempts to create the file in the working directory of the process. In the event that the file cannot be created in the working directory (insufficient space, permission problem, or other issue), the file is created in the temporary directory for the operating system.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser1030969View Question on Stackoverflow
Solution 1 - JavaEduard WirchView Answer on Stackoverflow