码迷,mamicode.com
首页 > 编程语言 > 详细

There is insufficient memory for the Java Runtime Environment to continue问题解决

时间:2014-07-31 23:57:00      阅读:641      评论:0      收藏:0      [点我收藏+]

标签:insufficient   memory   

在linux系统下长时间进行性能测试,连续几次发生服务器假死无法连接上的情况,无奈只能重启服务器。在测试路径下发现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位操作系统下,系统进程数达到上限了。

然后分析服务器内存,可用物理内存以及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问题解决,布布扣,bubuko.com

There is insufficient memory for the Java Runtime Environment to continue问题解决

标签:insufficient   memory   

原文地址:http://blog.csdn.net/xifeijian/article/details/38326281

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!