Could not reserve enough space for object heap解决办法
Centos6.4 Jdk1.6
1.在终端输入Java命令报错
[root@localhost local]# java
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
2.是系统参数(overcommit_memory和overcommit_ratio)配置的问题
3.查看系统内存分配状态
[root@localhost local]# grep -i commit /proc/meminfo
CommitLimit: kB
Committed_AS: kB
看到CommitLimit和Committed_As参数。
CommitLimit是一个内存分配上限,CommitLimit = 物理内存 * overcommit_ratio(默认50,即50%) + swap大小
Committed_As是已经分配的内存大小。
4.内核参数overcommit_memory
[root@localhost local]# cat /etc/sysctl.conf | grep overcommit_memory
vm.overcommit_memory=
它是 内存分配策略
可选值:0、1、2。
0, 表示内核将检查是否有足够的可用内存供应用进程使用;如果有足够的可用内存,内存申请允许;否则,内存申请失败,并把错误返回给应用进程。
1, 表示内核允许分配所有的物理内存,而不管当前的内存状态如何。
2, 表示内核允许分配超过所有物理内存和交换空间总和的内存
5. 解决办法
将vm.overcommit_memory 设为1即可
有三种方式修改内核参数,但要有root权限:
1)编辑/etc/sysctl.conf ,改vm.overcommit_memory=1,然后sysctl -p 使配置文件生效
2)sysctl vm.overcommit_memory=1
3)echo 1 > /proc/sys/vm/overcommit_memory
参考:http://blog.csdn.net/whycold/article/details/21388455
http://blog.csdn.net/jollyjumper/article/details/24127009
Could not reserve enough space for object heap解决办法的更多相关文章
- eclipse scala Could not reserve enough space for object heap
[学习笔记] 防盗版实名手机尾号:73203 Could not reserve enough space for object heap 解决方法:下面的缩写中:一个是memory max(Xmx) ...
- Android Studio: Failed to sync Gradle project 'xxx' Error:Unable to start the daemon process: could not reserve enough space for object heap.
创建项目的时候报错: Failed to sync Gradle project 'xxx' Error:Unable to start the daemon process: could not r ...
- Tomcat启动报错 Could not reserve enough space for object heap
报错信息: Error occurred during initialization of VM Could not reserve enough space for object heap Coul ...
- 启动tomcat报错 Could not reserve enough space for object heap的解决办法
问题:打开eclips启动tomcat发现报出Could not reserve enough space for object heap错误. 解决办法:1.首先检查tomcat是否能正常启动.re ...
- Error occurred during initialization of VM Could not reserve enough space for object heap
Error occurred during initialization of VM Could not reserve enough space for object heap Java虚拟机(JV ...
- fisheye Error occurred during initialization of VM Could not reserve enough space for object heap 问题解决!
参考文章:https://answers.atlassian.com/questions/9397/not-enough-heap-space-to-run-fisheye fisheye下载好了之后 ...
- 构建工具----gradle---可能遇到的问题----Could not reserve enough space for object heap
Could not reserve enough space for object heap 意思是 jvm的设置内存不足以运行gradle命令了. 分为两种情况,解决的方法也不同. .10/user ...
- JVM启动报错: Could not reserve enough space for object heap error
首先了解一下参数的含义: 参数 含义 -Xms2G -Xmx2G 代表jvm可用的heap内存最小和最大 -XX:PermSize -XX:MaxPermSize 代表jvm的metadata内存的大 ...
- Android Studio Gradle Could not reserve enough space for object heap
Studio 创建第一个工程报错 Error:Unable to start the daemon process.This problem might be caused by incorrect ...
随机推荐
- laravel Lumen邮箱发送配置
Lumen 中配置邮件 https://blog.csdn.net/glovenone/article/details/54344013 Lareval 比 Lumen 多了一个步骤 https:// ...
- html5离线缓存使用
html5 离线缓存使用以及注意事项 1.index.html中加入离线缓存的声明文件 如:<!DOCTYPE html><html manifest="test.appc ...
- GIT快速学习
http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/001373962845513ae ...
- Android开发:fragment将事件传递回activity
fragment触发事件后传递会给activity,可以通过在fragment中定义一个接口,让activity实现这个接口. 具体代码如下 public class AAFragment exten ...
- bin/mysqld: error while loading shared libraries: libnuma.so.1: 安装mysql
如果安装mysql出现了以上的报错信息.这是却少numactl这个时候如果是Centos就yum -y install numactl就可以解决这个问题了. ubuntu的就sudo apt-get ...
- python学习【第六篇】python迭代器与生成器
一.什么是迭代器 迭代器协议:对象必须提供一个next方法,执行该方法要么返回迭代中的下一项,要么就引起一个StopIteration异常,以终止迭代(只能往后走不能往前退) 可迭代对象:实现了迭代器 ...
- 《从零开始学Swift》学习笔记(Day 31)——存储属性
原创文章,欢迎转载.转载请注明:关东升的博客 Swift中的属性分为存储属性和计算属性,存储属性就是Objective-C中的数据成员,计算属性不存储数据,但可以通过计算其他属性返回数据. 存储属性可 ...
- Unique Encryption Keys
The security of many ciphers strongly depends on the fact that the keys are unique and never re-used ...
- grafana-----Annotation
注释提供了一个方法,在丰富的活动中做个标志点.当你鼠标移到这个注释上,你可以得到title,tags,和text information的事件. Queries 注释事件获得是通过一个注释查询.打开d ...
- SQLServer中exists和except用法
一.exists 1.1 说明 EXISTS(包括 NOT EXISTS)子句的返回值是一个BOOL值.EXISTS内部有一个子查询语句(SELECT ... FROM...),我将其称为EXIST的 ...