We are experiencing an issue where our SonarQube Community Edition instances are consuming an unexpectedly high amount of RAM. This is impacting the performance of our systems and other applications hosted on the same servers. We would like assistance in identifying and resolving the root cause.
Details:
SonarQube Version: Community Edition 10.6
Operating System: 22.04.2 LTS
RAM Usage Observed: [“Instance using 56 of 63 GiB”]
SonarQube Server spins up 4 processes that are capped in how much memory they can use based on what is configured in your conf/sonar.properties file (the -Xmx value for sonar.web.javaOpts, sonar.search.javaOpts, and sonar.ce.javaOpts).
Unless you’ve set these very high, I would recommend you look at what is actually consuming memory on your server. Are they java processes?
and after launching the command you provided:
4913.45 MB /opt/java/openjdk/bin/java
Please let me know if these configurations are recommended for my setup, especially considering I am running multiple SonarQube instances on the same node. This issue did not occur before upgrading to version 10.6.
If you’re running multiple SonarQube instances that can consume up 21 GB of memory each (the max values of -Xmx for each JVM process)… I’m not surprised you’re facing memory issues.
Typically these values only need to be adjusted from the defaults if you have a high-load SonarQube server, specifically running multiple CE workers – however, that’s a feature only available in Enterprise Edition and above.
Why did you adjust the memory values in the first place?
Not particularly. You should either reduce the amount of memory allocated to each SonarQube server or stop running multiple SonarQube instances on the same host.