Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are hs_err_pid.log files generated when Tomcat crashes?

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?

like image 377
user1030969 Avatar asked Nov 05 '11 10:11

user1030969


People also ask

What is Hs_err_pid log?

Whenever a JVM is crashed a fatal error log file is generated. The file is named as hs_err_pid<pid>. log (where <pid> is the process id of the process). Most cases this file is created in the same working directory and in some other cases the file may be created in the temporary location.

Can I delete Hs_err_pid files?

The file hs_err_pid. mdmp is a memory dump from a process crash. Any process can create this memory dump. You can safely remove them from server if you face any space issue in your environment.


1 Answers

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.

like image 61
Eduard Wirch Avatar answered Sep 21 '22 12:09

Eduard Wirch