Memory problem: 'error=12, Not enough space'

Article ID:204266124
1 minute readKnowledge base

Issue

You see this stack trace in build logs:

Caused by: java.io.IOException: error=12, Not enough space at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:79) at java.lang.ProcessImpl.start(ProcessImpl.java:130) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1023)

Resolution

You are running out of system memory on agent node when Java calls fork(). This situation can be triggered when agent (agent.jar JVM process) uses too much memory.

If command line launch argument of agent doesn’t contain any memory limiting parameters, you should add them, for example:

-Xms512m -Xmx512m
This article is part of our Knowledge Base and is provided for guidance-based purposes only. The solutions or workarounds described here are not officially supported by CloudBees and may not be applicable in all environments. Use at your own discretion, and test changes in a safe environment before applying them to production systems.