Builds fail due to insufficient memore allocation

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

Bamboo builds will fail with the exception,

java.io.IOException: Cannot run program "/home/pdp11/bin/maven/bin/mvn" (in directory "/home/pdp11/bamboo-home/xml-data/build-dir/PDP-CORE"): java.io.IOException: error=12, Cannot allocate memory
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
	at java.lang.Runtime.exec(Runtime.java:593)
	at sun.reflect.GeneratedMethodAccessor467.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:834)
	at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:435)
	at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:449)
	at com.atlassian.bamboo.command.Command.executeCommand(Command.java:80)
	at com.atlassian.bamboo.builder.AbstractBuilder.build(AbstractBuilder.java:195)
	at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:48)
	at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528)
	at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$1.run(NamedThreadFactory.java:31)
	at edu.emory.mathcs.backport.java.util.concurrent.helpers.ThreadHelpers$1.run(ThreadHelpers.java:34)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException: java.io.IOException: error=12, Cannot allocate memory
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
	at java.lang.ProcessImpl.start(ProcessImpl.java:65)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
	... 16 more

Cause

There isn't enough hardware memory on the machine and after server uptime of day or so, Bamboo builds started failing as memory was not available.

Resolution

Increase the physical memory on Bamboo machine.

Last modified on Jun 13, 2013

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.