查找了一下相关文档,发现这个错误的含义其实就是像它自己说的,没法分配内存了。

The problem is inherent with the way Java allocates memory when executing processes. When then exec(). Forking creates a child process by duplicating the current process. By duplicating the current process, the new child process will request approximately the same amount of memory as its parent process, essentially doubling the memory required. However, this does not mean all the memory allocated will be used, as exec() is immediately called to execute the different code within the child process, freeing up this memory. As an example, when Stash tries to locate git, the Stash JVM process must be forked, approximately doubling the memory required by Stash.

解决方案:

1. 编辑 /etc/sysctl.conf ,改vm.overcommit_memory=1,然后sysctl -p 使配置文件生效

  vi /etc/sysctl.conf

  修改/添加 vm.overcommit_memory=1

  Esc 退出  :wq 保存

  然后sysctl -p 使配置文件生效

Linux Cannot allocate memory问题的更多相关文章

  1. win7 mount到Linux下无法分配内存的问题(Cannot allocate memory)

    如题,我在win7系统下共享目录,mount到linux下,进行编译或者某些操作,出现Cannot allocate memory提示. 修改以下两个键值,然后重启server服务,可以解决这个问题: ...

  2. jmeter Linux环境执行总报错 cannot allocate memory

    1.windows环境写好的测试用例,执行没有问题,在Linux环境跑总是报错,提示如下 cannot allocate memory 2.一开始以为是哪块设置有问题,因为脚本里边有设置邮件自动发送, ...

  3. Linux Swap故障之 swapoff failed: Cannot allocate memory

    目录swap分区关闭方法1:释放内存缓存方法2:允许内存overcommit swap分区关闭准备调整Linux下的swap分区的使用率.在Linux下执行 swapoff -a -v报如下错误:sw ...

  4. linux下的缓存机制buffer、cache、swap - 运维总结 ["Cannot allocate memory"问题]

    一.缓存机制介绍 在Linux系统中,为了提高文件系统性能,内核利用一部分物理内存分配出缓冲区,用于缓存系统操作和数据文件,当内核收到读写的请求时,内核先去缓存区找是否有请求的数据,有就直接返回,如果 ...

  5. MySql启动,提示:Plugin 'FEDERATED' is disabled....Cannot allocate memory for the buffer pool

    2016-05-27 09:25:01 31332 [Note] Plugin 'FEDERATED' is disabled. 2016-05-27 09:25:01 31332 [Note] In ...

  6. mysql报错mmap(137428992 bytes) failed; errno 12,Cannot allocate memory for the buffer pool

    mysql以`systemctl start mysqld.service`的方式启动一段时间后发现突然无法启动,尝试重新启动也不能解决问题,排查问题时,先后通过`systemctl status m ...

  7. -bash: fork: Cannot allocate memory

    今天遇到服务器无法SSH,VNC操作命令提示fork:cannot allocate memory free查看内存还有(注意,命令可能要多敲几次才会出来) 查看最大进程数 sysctl kernel ...

  8. centos Cannot allocate memory for the buffer pool

    mysql 无法启动 ,查看日志: --01T15::.401599Z [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. P ...

  9. redis 写磁盘出错 Can’t save in background: fork: Cannot allocate memory (转)

    查看 Redis 日志 发现系统在频繁报错: [26641] 18 Dec 04:02:14 * 1 changes in 900 seconds. Saving… [26641] 18 Dec 04 ...

随机推荐

  1. pyinstaller 打包exe程序读不到配置文件No such file

    挺久没更新博客的,一来之前是觉得才疏学浅,记录下来的太简单没人看.二来时间上不是很充裕(不是借口,有时间打游戏,没时间总结) 偶然有一次发现同事在搜索解决问题的时候正在看我博客的解决思路,很奇妙的感觉 ...

  2. Java性能调优的9个实用方法

    1.使用StringBuilder StingBuilder 应该是在我们的Java代码中默认使用的,应该避免使用 + 操作符. 一般来说,使用 StringBuilder 的效果要优于使用 + 操作 ...

  3. 用深度学习做命名实体识别(六)-BERT介绍

    什么是BERT? BERT,全称是Bidirectional Encoder Representations from Transformers.可以理解为一种以Transformers为主要框架的双 ...

  4. [Python] Python 学习记录(1)

    1.概论 弱类型 一个变量能被赋值时能与原类型不同 x = 1 x = "1"  #不加分号,给x赋值为int后再次赋值为string是可行的 与或非 and or not /  ...

  5. .NET进阶篇03-Reflection反射、Attribute特性

    知识需要不断积累.总结和沉淀,思考和写作是成长的催化剂 内容目录 一.概述二.反射1.反射使用2.创建对象3.调用方法4.字段属性三.特性四.总结 一.概述 反射其实无处不在,我们用VS进行调试时候, ...

  6. Vue-CLI项目快速UI布局-element-ui

    0902自我总结 Vue-CLI项目快速UI布局-element-ui 一.element-ui的地址 https://element.eleme.cn/ 二.element-ui的安装 <!- ...

  7. python selenium之Xpath定位

    属性描述 XPath 语法支持节点描述,节点描述为一个逻辑真假表达式,任何真假判断表达式都可在节点后方括号里表示,这条件必须在XPath处理这个节点前先被满足.在某一步骤可有多少个描述并没有限制. 对 ...

  8. Python_函数传参

    关于函数中传递参数的相关知识 其中 万能参数 第一次听说 但感觉用处不大 后面用到再详细整理

  9. 构造函数语义学——Default Constructor篇

    构造函数语义学--Default Constructor 篇 这一章原书主要分析了:编译器关于对象构造过程的干涉,即在对象构造这个过程中,编译器到底在背后做了什么 这一章的重点在于 default c ...

  10. win2008加入域控之尝试解析加入域中域控制器的dns名称失败解决办法

    记录下今天遇到以前没遇到的问题 加入域的时候提示“尝试解析加入域中控制器的DNS”名称失败 可能的原因: 如果确认dns没问题 dc正常访问,那可能就是因为域控制器无法向dns注册srv记录. SRV ...