java - Tomcat 崩溃时生成的 hs_err_pid.log 文件是什么?

标签 java tomcat crash jvm

为了生成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/

相关文章:

java - 异常:com. fastxml.jackson.core.JsonParseException:HttpMessageNotReadableException

mysql - 与数据源的连接过多

macos - 在另一台Mac上打开后,我构建的任何Mac应用(osx)都会立即崩溃

c# - UIColor 子类中的工厂方法导致崩溃

java - 获取时间四舍五入到最接近的 5 分钟间隔并仅将分钟转换为字符串

java - 幸运游戏 GUI.. 怎么了?

java - 使用 Spring Boot 在 Angular 中成功调用 OPTIONS 后,未调用 GET 请求

docker - SCADA LTS - HTTP 状态 404

java - Elastic Beanstalk 上的 Tomcat 部署 : The site cannot be reached

ruby-on-rails - Heroku 应用总是崩溃