JVM在Bamboo中耗尽内存

时间:2018-02-15 21:03:57

标签: amazon-ec2 bamboo

我正面临一个问题。

目前在AWS中的On-Demand Bamboo服务器上运行构建,我收到错误并且日志显示:

OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory.......failed; error='Cannot allocate memory' (errno=12)      

# There is insufficient memory for the Java Runtime Environment to continue.  
# Native memory allocation (mmap) failed to map XXXXX bytes for committing reserved memory."

有人知道如何为Bamboo分配内存,因为它是在AWS中托管的吗? (我对两者都没有多少经验)

谢谢。

1 个答案:

答案 0 :(得分:0)

你有没有解决过这个问题?我首先检查内存使用情况( free -m ),然后尝试在Bamboo之外运行构建,看看是否按预期工作。

您还可以更新bamboo bin目录中的setenv.sh文件以添加内存选项。使用一些合理的值更新JAVA_OPTS,例如-Xmx768m -Xms512m,这对你的构建项目很有意义。