Troubleshoot Jenkins Out-of-Memory Failures
Typically default
Troubleshoot Jenkins setupOut-of-Memory hasFailures
Use this checklist when a lowJenkins setupjob amountthat ofsupports heapAIQ memoryworkflows space (256Mb). This is good enough for medium size scenarios, but bulk scenarios needing to upload a lot of files for the scenario execution might failfails with an OutOfMemoryError:out-of-memory Java heap space error similar to
error.
Recommended
C:\ProgramData\Jenkins\.jenkins\workspace\Smoke\Smoke.xml:221:guidancejava.lang.OutOfMemoryError:
- Separate
JavaJenkinsheapcontroller,spaceagent,atbuildjava.base/java.util.Arrays.copyOf(Arrays.java:3745)tool,
Intest-process thismemory casessymptoms.
Validation workflow
- Identify the exact process reporting out-of-memory.
- Review heap, container, agent, and build-tool settings.
- Run a smaller validation job to
increaseisolate scale-related failures. - Apply the
defaultsmallestJavasafeheap memory available to Jenkins server.To do that please follow following steps if your Jenkins server is Windows. Similar steps needs to be done in case of Jenkins using linux. Log into your Jenkins server via RDPconfiguration orSSHworkloadifchangeitandis ubuntu. You will need credentials for this.
Locatedocument the file jenkins.xml file. Location may vary depending of operating system. In case of windows can find it normally at C:\Program Files\Jenkins.
Edit the jenkins.xml file in a test editor to increase the value of the -Xmx java parameter from -Xmx256m to -Xmx2048m or more
Add a environment variable with JAVA_OPTS name and value -Xmx2048Mb
Open the TaskManager app and select Services Tab. Select java.exe for Jenkins process and stop it and restart it.
Last updated: JuneSeptember 26,20, 20232026
If you have any feedback on this topic, please contact us at documentation@appvance.ai