Jenkins build failing due to Checkmarx despite increasing Java heap space

182 Views Asked by At

My Jenkins build is failing after retrieving the SAST scan results from the Checkmarx Plugin.

[Cx-Info]: Waiting for SAST scan results. Elapsed time: 00:43:26. 99% processed. Status: Finished.  
[Cx-Info]: SAST scan finished successfully.  
[Cx-Info]: Retrieving SAST scan results  
FATAL: Java heap space  
java.lang.OutOfMemoryError: Java heap space  
    at org.apache.commons.io.IOUtils.byteArray(IOUtils.java:338)

I have already tried increasing the xmx significantly up to -Xmx2g. UPDATE: I have also tried 3GB:

Checking if Java is installed by asking for version.  
Java Source: DETECT_JAVA_PATH=C:\Program Files (x86)\Jenkins\jre\bin\java.exe  
Java Standard Output: Error occurred during initialization of VM  
Could not reserve enough space for 2097152KB object heap  

Java Error Output: Picked up JAVA_TOOL_OPTIONS: -Xms256m -Xmx2g  

I rebooted Jenkins by appending /safeRestart to the URL. All of this continued to result in the error persisting. Are there any other solutions to this or do I need to add even more memory?

0

There are 0 best solutions below