Java heap space Error (java.lang.OutOfMemoryError: Java heap space)

Hi,

we’re using:

  • SonarQube Version 8.0.0.29455
  • SonarScanner 4.5.0.2216

We’ve tried to set the environment variable as follows:
export SONAR_SCANNER_OPTS="-Xmx4096m"

During a scan from a MacOS machine we encounter this error:

We have used the following command:

sonar-scanner -X > sonarCdo.log

so we have a full debug file, but we’d prefer to share it privately if necessary.
List of plugins follows below.

Thanks for your attention. We’re looking forward to your reply.

All the best,

L.

Plugins:
SonarCSS 1.1.1.1010 (cssfamily)
Svn 1.9.0.1295 (scmsvn)
SonarPLSQL 3.4.1.2576 (plsql)
SonarScala 1.5.0.315 (sonarscala)
SonarC# 7.17.0.9346 (csharp)
Vulnerability Analysis 8.0.0.5505 (security)
SonarJava 5.14.0.18788 (java)
SonarHTML 3.2.0.2082 (web)
SonarFlex 2.5.1.1831 (flex)
SonarXML 2.0.1.2020 (xml)
SonarTS 1.9.0.3766 (typescript)
SonarVB 7.17.0.9346 (vbnet)
SonarSwift 4.1.0.3087 (swift)
SonarCFamily 6.4.0.11646 (cpp)
SonarPython 1.16.0.4432 (python)
JaCoCo 1.0.2.475 (jacoco)
SonarGo 1.6.0.719 (go)
SonarKotlin 1.5.0.315 (kotlin)
SonarTSQL 1.4.0.3334 (tsql)
SonarJS 5.2.1.7778 (javascript)
SonarRuby 1.5.0.315 (ruby)
Vulnerability Rules for C# 8.0.0.5505 (securitycsharpfrontend)
Vulnerability Rules for Java 8.0.0.5505 (securityjavafrontend)
License for SonarLint 8.0 (license)
Git 1.9.1.1834 (scmgit)
SonarPHP 3.2.0.4868 (php)
SonarABAP 3.8.0.2034 (abap)
Vulnerability Rules for PHP 8.0.0.5505 (securityphpfrontend)

Hi Luigi,

SonarQube 8.0 is over a year old and quite outdated. We’d recommend you consider an update to the latest version (currently 8.7) as soon as possible.

If your logged output indicates the value of SONAR_SCANNER_OPTS is being used, perhaps you just didn’t set it high enough. 4096M is merely an example value in our docs; you might need to adjust higher depending upon the needs of the project. If you have the available memory, pump it up!

Hi Jeff,
is there a recommended upgrade path from 8.0 to 8.7 version that contemplates intermediate versions or we can go directly from 8.0 to 8.7?
Is there a spreadsheet version of the following matrix?
Plugin Version Matrix | SonarQube Docs
thanks in advance,
All the best,
L.