我在 Amazon t2.micro Ubuntu 实例中的 Jenkins 中运行 ant。Java 任务失败。下面是我的 Jenkins 控制台
[java] Compiling module com.eit.manufacturing.displayprocessor.Manufacturing
[java] Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000ed84e000, 53288960, 0) failed; error='Cannot allocate memory' (errno=12)
[java] #
[java] # There is insufficient memory for the Java Runtime Environment to continue.
[java] # Native memory allocation (malloc) failed to allocate 53288960 bytes for committing reserved memory.
[java] # An error report file with more information is saved as:
[java] # /root/.jenkins/jobs/Manufacturing Apps/workspace/ManufacturingWeb/hs_err_pid5235.log
这是我的蚂蚁脚本:
<target
name="clientcompile"
depends="servercompile"
description="GWT compile to JavaScript (production mode)" >
<java
classname="com.google.gwt.dev.Compiler"
failonerror="true"
fork="true" >
<classpath>
<pathelement location="src" />
<path refid="project.class.path" />
<pathelement location="${gwt.sdk}validation-api-1.0.0.GA.jar" />
<pathelement location="${gwt.sdk}validation-api-1.0.0.GA-sources.jar" />
</classpath>
<jvmarg value="-Xmx256M" />
<arg line="-war" />
<arg value="war" />
<arg line="${gwt.args}" />
<arg value="com.eit.manufacturing.displayprocessor.Manufacturing" />
</java>
</target>
如何解决这个问题?
尝试以下java
任务
<jvmarg value="-Xmx1g" />