java.lang.OutOfMemoryError: Java heap space

In background tasks, I see a error message details are shown in the images. It is a quite large monorepo. can you please help us to resolve it ?

SonarQube Enterprise 9.9 LTS
Github Actions


You’ll (or a server admin / ops person) will need to adjust the amount of heap space available to the Compute Engine.

You can find these settings (sonar.ce.javaOpts) in the conf/ file of your SonarQube instance, or if your instance is deployed by Docker, by adjusting the appropriate Environment variable. Any change will require restarting the SonarQube service.

I suggest doubling the defaults to start, and see if that improves the situation.

We set sonar.ce.javaOpts to 8 GB, but it did not resolve the issue. Are you sure the error is caused by the Compute Engine, or could it be due to something else?

Yes, I am quite sure the issue is from the Compute Engine.

Did you make sure the heap values were appropriately applied? You can check your global Administration > System page.