java.lang.OutOfMemoryError: Java heap space

Hi!, we recently started seeing failure for one of our projects in the CI, during sonarcloud analysis we are seeing this now

ERROR: Error during SonarScanner execution

java.lang.OutOfMemoryError: Java heap space

we tried to increase the memory also using SONAR_SCANNER_OPTS but still getting the same error, can you please help ?

Hi @Rishav219,

thanks for reporting your issue!

Can you provide us with logs of the scan detailing where the issue is coming from?
I have a suspicion that it’s related to the secrets analysis, but without the logs I can’t be sure.

You can also already try to run this project with the additional flag sonar.scanner.excludeHiddenFiles=true. If it’s because of the secrets analysis, this should fix your problem.

Best
Jonas

1 Like

Thanks Jonas, this time it worked by using this flag sonar.scanner.excludeHiddenFiles=true

2 Likes

Thanks for confirming!

We’re already working on a fix for the secrets analyzer, which should be deployed soon on SonarQube Cloud.

Best

1 Like