The last analysis has failed. More details available on the Background Tasks page. When I perform analysis from Jenkins

Hello, when running a scan from jenkins (pipeline), it runs successfully, but I check in sonar and see the following:

I will Background Tasks and expand Show Error Details, the error message is the following:

java.lang.OutOfMemoryError: Java heap space

I have tried to adjust these parameters in the pipeline so that the analysis runs correctly but I have not succeeded:

SONAR_RUNNER_OPTS
SONAR_SCANNER_OPTS
MAVEN_OPTS

Any help is helpful…

Hi,

Those parameters only allocate memory to the analysis, not to the SonarQube server. To adjust the server memory allocations, take a look at the sonar.*.javaOpts properties in $SONARQUBE-HOME/conf/sonar.properties. You’ll find them commented out by default. Probably the one you need to adjust is sonar.ce.javaOpts.

 
HTH,
Ann