java.lang.OutOfMemoryError: Java heap space

Hello,
after an update from the version 9.9.4 to the version 2025.1 on on the 22th of may, we are encountering the same issue with the same error and also on only 1 project.
On the project side, the error starts as following "INFO: Time spent writing ucfgs 31ms
##[error]Exception in thread “pool-5-thread-1” java.lang.OutOfMemoryError: Java heap space
Exception in thread “pool-5-thread-1” java.lang.OutOfMemoryError: Java heap space
".
So i started to increase the memory server side, then we increased the max memory pipeline side to 2 go, then 4go but the outcome remains the same.

Does anyone else encountered this issue and found a workaround to have the analyse completed?

Best regards,

Céline

Hey there.

I moved your question to a seperate thread because I believe it’s ultimately unrelated to the thread you orgiinally posted on.

If the exception is as you say, then you should only focus on scanner-side.

How did you go about doing that? By adjusting sonar.scanner.javaOpts (env variable SONAR_SCANNER_JAVA_OPTS)? Depending on what version of the scanner you’re using, you may need to try SONAR_SCANNER_OPTS.

Hello Colin,
Thank you for moving my issue to a new thread, although, in the Sonar logs, I had the exactly same error each time the pipeline failed, I just showed the error returned in the pipeline to avoid making a doublon with the op.

I was not aware of the variable “SONAR_SCANNER_JAVA_OPTS”.

We added SONAR_SCANNER_OPTS: “-Xmx4096m” to the analyze task in the pipeline, as in the exemple below:

task: SonarQubeAnalyze@7
enabled: true
condition: succeededOrFailed()
continueOnError: true
env:
SONAR_SCANNER_OPTS: “-Xmx4096m”
inputs:
jdkversion: ‘JAVA_HOME’

My colleague pushed the max value to 10 GO and the analyze finally succeeded to complete.