jerome79
(Jérôme)
March 2, 2026, 2:48pm
1
Hello,
I see that when I set sonar.web.javaOpts or sonar.ce.javaOpts in sonarProperties for Helm chart, value is not used.
Any JVM flag (-Xmx for example) I set is not used.
But if I set sonar.web.javaAdditionalOpts or sonar.ce.javaAdditionalOpts, flags are used !
For sonar.search.javaOpts, flags are used without problem.
For example :
sonar.web.javaOpts: -Xmx2G → JVM flag is not used
sonar.web.javaAdditionalOpts: -Xmx2G → JVM flag is used
sonar.ce.javaOpts: -Xmx2G → JVM flag is not used
sonar.ce.javaAdditionalOpts: -Xmx2G → JVM flag is used
sonar.search.javaOpts: -Xmx2G → JVM flag is used
Any idea why the flags are not used the same way ?
Thanks,
Jérôme
ganncamp
(G Ann Campbell)
March 3, 2026, 1:40pm
2
Hi Jerome,
(Sorry about the missing accents. AmE keyboard )
Can you share how you’re setting these values?
Thx,
Ann
jerome79
(Jérôme)
March 3, 2026, 2:28pm
3
Hi Ann,
No problem for the accents .
I use Helm to deploy our SonarQube Community instance.
These values are set in the values.yaml like that :
sonarProperties:
sonar.web.javaOpts: -Xmx2G
sonar.ce.javaOpts: -Xmx2G
Regards,
Jérôme
ganncamp
(G Ann Campbell)
March 3, 2026, 4:27pm
4
Hi Jerome,
Checking the docs I see
Parameters passed in the command line have precedence over parameters set in values.yaml
Are you passing anything on the command line?
Thx,
Ann
jerome79
(Jérôme)
March 4, 2026, 10:02am
5
Hi Ann,
These settings are only passed on values.yaml and not on command line.
As I said, if I set sonar.web.javaAdditionalOpts the same way sonar.web.javaOpts, flag is used.
Thx,
Jérôme
ganncamp
(G Ann Campbell)
March 4, 2026, 12:42pm
6
Hi Jerome,
Thanks for clarifying. I’m going to flag this for the team.
Ann
1 Like
Hello @jerome79
Thank you for reporting this, unfortunately I could not reproduce your issue locally… Can you please share the exact Helm chart version you are using?
Thank you.
jerome79
(Jérôme)
March 5, 2026, 8:37am
10
Hello @hatem.amairi ,
Sure, I use version 2026.1.0 of the chart.
When you set sonar.web.javaOpts: -Xmx2G or sonar.ce.javaOpts: -Xmx2G, flag is passed to the JVM ?
Jérôme
Hello. Here is how I tried to reproduce and my findings:
Chart version: 2026.1.0
App version: 2026.1.0
Edition: Community Build (community.enabled=true, image sonarqube:26.1.0.118079-community)
1. javaOpts
sonarProperties:
sonar.web.javaOpts: -Xmx2G -Xms2G -Drepro.web.javaOpts=true
sonar.ce.javaOpts: -Xmx2G -Xms2G -Drepro.ce.javaOpts=true
sonar.search.javaOpts: -Xmx2G -Xms2G -Drepro.search.javaOpts=true
Runtime env
SONAR_CE_JAVAOPTS=-Xmx2G -Xms2G -Drepro.ce.javaOpts=true
SONAR_WEB_JAVAOPTS=-Xmx2G -Xms2G -Drepro.web.javaOpts=true
JVM process args
... org.sonar.server.app.WebServer ... -Xmx2G -Xms2G -Drepro.web.javaOpts=true ...
... org.sonar.ce.app.CeServer ... -Xmx2G -Xms2G -Drepro.ce.javaOpts=true ...
... org.elasticsearch.bootstrap.Elasticsearch ... -Xmx2G -Xms2G -Drepro.search.javaOpts=true ...
2. javaAdditionalOpts
sonarProperties:
sonar.web.javaAdditionalOpts: -Xmx2G -Xms2G -Drepro.web.javaAdditionalOpts=true
sonar.ce.javaAdditionalOpts: -Xmx2G -Xms2G -Drepro.ce.javaAdditionalOpts=true
sonar.search.javaOpts: -Xmx2G -Xms2G -Drepro.search.javaOpts=true
Runtime env
SONAR_CE_JAVAOPTS=
SONAR_WEB_JAVAOPTS=
This is expected as javaAdditionalOpts live in /opt/sonarqube/conf/sonar.properties and are injected to the JVM at runtime.
sonar.properties content
sonar.ce.javaAdditionalOpts=-Xmx2G -Xms2G -Drepro.ce.javaAdditionalOpts=true
sonar.search.javaOpts=-Xmx2G -Xms2G -Drepro.search.javaOpts=true
sonar.web.javaAdditionalOpts=-Xmx2G -Xms2G -Drepro.web.javaAdditionalOpts=true
JVM process args
... org.sonar.server.app.WebServer ... -Xmx512m -Xms128m ... -Xmx2G -Xms2G -Drepro.web.javaAdditionalOpts=true ...
... org.sonar.ce.app.CeServer ... -Xmx512m -Xms128m ... -Xmx2G -Xms2G -Drepro.ce.javaAdditionalOpts=true ...
... org.elasticsearch.bootstrap.Elasticsearch ... -Xmx2G -Xms2G -Drepro.search.javaOpts=true ...
Note: -Drepro.* flags are custom markers so we can track that the values came from the values.yaml file.
If you still think I missed something, please share your exact setup and the exact steps/commands you used to verify the JVM args were missing. I can then compare with my reproduction attempt.
Best regards,
jerome79
(Jérôme)
March 6, 2026, 8:19am
12
Ok, thanks for your feedback @hatem.amairi .
I will do other tests to check that.
1 Like