Skip to main content

Why Jenkins job is failing with an Out of Memory error?

Troubleshoot

Typically default Jenkins Out-of-Memorysetup Failures

Use this checklist whenhas a Jenkinslow jobsetup thatamount supportsof AIQheap workflowsmemory failsspace (256Mb). This is good enough for medium size scenarios, but bulk scenarios needing to upload a lot of files for the scenario execution might fail with an out-of-OutOfMemoryError: Java heap space error similar to

C:\ProgramData\Jenkins\.jenkins\workspace\Smoke\Smoke.xml:221: java.lang.OutOfMemoryError: Java heap space
	at java.base/java.util.Arrays.copyOf(Arrays.java:3745)

In this cases you need to increase the default Java heap memory error.

available
  • Separateto Jenkins controller,server. agent,

    To builddo tool,that Java,please follow following steps if your Jenkins server is Windows. Similar steps needs to be done in case of Jenkins using linux.

    1. Log into your Jenkins server via RDP or SSH if it is ubuntu. You will need credentials for this.

    Locate 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 test-processvalue memory-Xmx2048Mb

    symptoms. Review recent changes in dependency size, test volume, browser count, or artifacts.Avoid simply increasing memory without identifying

    Open the failingTaskManager process.

    Captureapp and select Services Tab. Select java.exe for Jenkins logs, build URL,process and relatedstop AIQ execution IDs.

    Validation workflow

    1. Identify the exact process reporting out-of-memory.
    2. Review heap, container, agent,it and build-toolrestart settings.it.
    3. Run a smaller validation job to isolate scale-related failures.
    4. Apply the smallest safe configuration or workload change and document the result.



        Last updated: SeptemberJune 20,26, 20262023

        If you have any feedback on this topic, please contact us at documentation@appvance.ai