Issue
You see one of the following stacktraces on jenkins.log
:
java.lang.OutOfMemoryError
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: GC Overhead limit exceeded
Environment
-
CloudBees Jenkins Enterprise - Managed controller (CJEMM)
-
CloudBees Jenkins Enterprise - Operations Center (CJEOC)
-
CloudBees Jenkins Team (CJT)
Resolution
1. Set right Heap Size
As explained in Java Heap settings best practice
2. Tuning your Garbage Collector according to your Heap Size
Garbage collection (GC) is a dynamic approach to automatic memory management and heap allocation that processes and identifies dead memory blocks and reallocates storage for reuse.
As explained in Prepare Jenkins for Support > Java Parameters > Section II