2016-02-05 45 views
0

在部署到带有Java堆空间问题的JBoss/WildFly 8时,My Jenkins构建有时会失败。通过Java堆空间部署到JBoss/WildFly 8失败

[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.1.0.Alpha2:deploy (default-cli) on project Prometheus: Deployment failed: Operation failed: "JBAS014749: Operation handler failed: Java heap space" -> [Help 1] 
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles: 

我每次发生这种情况都要重新启动我的JBoss/WildFly部署到服务器。请帮我清除问题,以免妨碍我的自动化。

+0

您使用的是什么版本的Java?而且,你可能需要用更多的堆空间来启动它。 –

+0

Java 1.8.0_25,我应该在哪里更改堆空间? –

+0

你要添加['javaOpts'(https://docs.jboss.org/wildfly/plugins/maven/latest/start-mojo.html),并指定了'-Xmx'和'-XX: MaxMetaspaceSize'(两者取等号,随后的值,然后尺寸后缀,'= 1g'和'= 1024m'指定的数字值是相同的)。至于合适的尺寸,您需要以机器内存限制为指导。 –

回答

0

转到斌/ standalone.conf找到行,其中JAVA_OPTS -Xmx设置,并根据您的需要进行更新。

+0

我改变这些值,但我们仍然面临的问题 JAVA_OPTS = “ - Xms512m -Xmx1024m -XX:MaxPermSize参数=256米-Djava.net.preferIPv4Stack =真” –