Java.lang.OutofMemoryError : Java heap space, during SonarQube execution for C# code

When I tried to run a static code analysis for C# code in SonarQube, I got an error as Java.lang.OutofMemoryError: Java heap space,

.

Referring to the documentation to solve the issue,(Ref:https://docs.sonarqube.org/latest/instance-administration/monitoring/) implemented the solution.

But still the same issue not resolved. Kindly help me to sort this out.

The settings you changed affect server memory, whereas the scanner is an independent process with its own JVM. You can control the allocation of memory on the scanner side by setting the SONAR_SCANNER_OPTS environment variable as documented here. Increase the -Xmx (max heap space) value until the error is resolved.

I tried setting up a environment variable. Still facing the same issue. Help me resolve the same

hi @SaranyaC. The variable should be SONAR_SCANNER_OPTS and not set SONAR_SCANNER_OPTS.

A post was split to a new topic: Java.lang.OutofMemoryError : Java heap space, during SonarQube execution for C++