hs_err_pid

时间:2022-05-02
本文章向大家介绍hs_err_pid,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

hs_err_pid这种文件,是JVM出现错误时dump下来的。记录了错误发生当时:

1)JVM的状态参数

2)Linux的状态参数

 就以下面的文件为例:

#
# There is insufficient memory for the Java Runtime Environment to continue.
# Cannot create GC thread. Out of system resources.
# Possible reasons:
#   The system is out of physical RAM or swap space
#   In 32 bit mode, the process size limit was hit
# Possible solutions:
#   Reduce memory load on the system
#   Increase physical memory or swap space
#   Check if swap backing store is full
#   Use 64 bit Java on a 64 bit OS
#   Decrease Java heap size (-Xmx/-Xms)
#   Decrease number of Java threads
#   Decrease Java thread stack sizes (-Xss)
#   Set larger code cache with -XX:ReservedCodeCacheSize=
# This output file may be truncated or incomplete.
#
#  Out of Memory Error (gcTaskThread.cpp:48), pid=92270, tid=140070527960832
#
# JRE version:  (8.0_77-b03) (build )
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.77-b03 mixed mode linux-amd64 compressed oops)
# Core dump written. Default location: /data/home/data_monitor/dmonitor/dmonitor/core or core.92270 (max size 100000 kB). To ensure a full core dump, try "ulimit -c unlimite
d" before starting Java again
#

 出现上述文件的可能原因是:

1)内存不够

2)进程打开数达到上限

1、释放内存 请参看这篇文章

http://www.cnblogs.com/kangoroo/p/7375604.html

2、修改进程打开数上限

修改文件/etc/security/limits.conf

idata@qa-f1502-xg01.xg01:~$ vim /etc/security/limits.conf 

修改例子如下

arch          soft    nproc           102400
arch          hard    nproc           102400

第一列:linux系统用户名,*代表所有

第二列:软连接/硬链接

第三列:类型,nproc-进程的数量/nofile-文件打开数/core-core文件大小

第四列:数量