为了生成hs_err_pid.log
文件,是否需要在Tomcat 配置工具的Java 选项卡上进行任何特定设置?
hs_err_pid.log
文件的默认位置是什么?这个位置可以更改吗?
最佳答案
关于这个主题的一个非常非常好的文档是Troubleshooting Guide for Java来自(最初)太阳。有关 hs_err_pid*
文件的信息,请参阅“系统崩溃故障排除”一章。
见 Appendix C - Fatal Error Log
根据指南,默认情况下,如果可能,文件将在进程的工作目录中创建,否则将在系统临时目录中创建。可以通过传入 -XX:ErrorFile
产品标志来选择特定位置。它说:
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.
关于java - Tomcat 崩溃时生成的 hs_err_pid.log 文件是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8019596/