VM无法为对象堆保留足够的空间 [英] VM Could not reserve enough space for object heap

查看:174
本文介绍了VM无法为对象堆保留足够的空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在Windows机器上升级到Jenkins 1.500.我也有一个8GB RAM的Windows从站.我已经与该从属服务器建立了远程连接,并从Jenkins Web界面(使用JNLP启动按钮)启动了它.

I have just upgraded to Jenkins 1.500 on a windows machine. I also have a windows slave with 8GB RAM. I have made a remote connection to this slave and started it from the Jenkins webinterface (using the JNLP launch button).

它在Jenkins上显示得很好,我已经为其分配了一些工作.其中一项作业使用以下vm args调用Java应用程序:

It shows up just fine on Jenkins and I have assigned some jobs to it. One of the jobs calls a java application with the following vm args:

-XX:MaxPermSize=512m -Xmx1024m

但是作业失败,并显示以下错误:

but the job fails with this error:

Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine.

如果我在从属服务器上本地运行作业,则可以正常工作.有什么想法为什么通过jenkins触发了Windows从站上的构建失败?

If I run the job locally on the slave it works fine. Any ideas why the build fails on the windows slave when triggered through jenkins?

升级之前,该作业在从属服务器上运行良好.

The job ran fine on the slave BEFORE the upgrade.

从站正在运行: Java版本"1.6.0_34" Java(TM)SE运行时环境(内部版本1.6.0_34-b04) Java HotSpot(TM)64位服务器VM(内部版本20.9-b04,混合模式)

The slave is running: java version "1.6.0_34" Java(TM) SE Runtime Environment (build 1.6.0_34-b04) Java HotSpot(TM) 64-Bit Server VM (build 20.9-b04, mixed mode)

推荐答案

对此的解决方案是: 在您的maven安装中,修改mvn文件并添加以下内容:

The solution to this is: In your maven installation modify the mvn file and add the below :

导出MAVEN_OPTS = -Xmx1024m

export MAVEN_OPTS=-Xmx1024m

这篇关于VM无法为对象堆保留足够的空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆