There is insufficient memory for the Java Runtime Environment to continue问题解决
2017-04-30 08:41
1381 查看
在linux系统下长时间进行性能測试,连续几次发生server假死无法连接上的情况,无奈仅仅能重新启动server。在測试路径下发现hs_err_pid17285.log文件,打开文件查看其主要内容例如以下:
# 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:46), pid=17285, tid=47629249568816
#
# JRE version: 6.0_43-b01
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.14-b01 mixed mode linux-amd64 compressed oops)
从日志中分析,可能原因有两个:
一、可能物理内存不足
二、在32位操作系统下,系统进程数达到上限了。
然后分析server内存,可用物理内存以及swap空间都足,够,做个猜想,问题可能发生在系统进程数达到上限。
通过命令查看系统限制:ulimit -a查看open files不够大,尝试通过设大该值:
1、vi /etc/security/limits.conf
2、在文件最下方加上例如以下代码 * - nofile 278528 保存(已经设置得够大了)
此时通过ulimit -a或ulimit -n能够得到结果278528
在接下来的測试中经过观察,没有再发生服务假死不提供服务的情况,临时得到解决。
# 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:46), pid=17285, tid=47629249568816
#
# JRE version: 6.0_43-b01
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.14-b01 mixed mode linux-amd64 compressed oops)
从日志中分析,可能原因有两个:
一、可能物理内存不足
二、在32位操作系统下,系统进程数达到上限了。
然后分析server内存,可用物理内存以及swap空间都足,够,做个猜想,问题可能发生在系统进程数达到上限。
通过命令查看系统限制:ulimit -a查看open files不够大,尝试通过设大该值:
1、vi /etc/security/limits.conf
2、在文件最下方加上例如以下代码 * - nofile 278528 保存(已经设置得够大了)
此时通过ulimit -a或ulimit -n能够得到结果278528
在接下来的測试中经过观察,没有再发生服务假死不提供服务的情况,临时得到解决。
相关文章推荐
- There is insufficient memory for the Java Runtime Environment to continue问题解决
- There is insufficient memory for the Java Runtime Environment to continue. 解决
- 64位Ubuntu14.04 tomcat日志报错 There is insufficient memory for the Java Runtime Environment to continue
- There is insufficient memory for the Java Runtime Environment to continue
- There is insufficient memory for the Java Runtime Environment to continue.
- Python 3 was configured to use ASCII as encoding for the environment 问题解决
- mybatis加Spring项目: 解决There is no getter for property named '***' in 'class java.lang.String'问题
- checkstyle问题:解决Got an exception - java.lang.RuntimeException: Unable to get class information for ***Exception
- 关于打开Eclipse时出现eclipse failed to create the java virtual machine与locking is not possible in the directory问题的解决
- 依赖注入问题解决:No bean is eligible for injection to the injection point [JSR-299 §5.2.1]
- "Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace"问题解决
- 解决Genymotion模拟器无法使用问题“the file is currupt”,“uable to boot-please use a kernel appropriate for your c
- Java问题解决:springboot启动出现-Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package
- 修改jdk的版本后,软件启动报错:The registry refers to a nonexistent Java Runtime Environment installation or the runtime is corrupted.
- 解决The environment variable JAVA_HOME does not point to a valid JVM installation 问题
- There is no getter for property named 'id' in 'class java.lang.Integer'问题解决办法
- Maven项目导入到Eclipse时Build出现the user operation is waiting for building workspace to complete的问题解决
- 使用myeclipse开发java,解决java中继承JFrame类出现The type JFrame is not accessible due to restriction的问题
- 解决Unity3D中“There is no 'Renderer' attached to the game object”问题
- Java解析DBF文件,错误Failed to parse Number: For input string: "-.---" 或读取不出数据或乱码问题都在这里解决