Error: Exception in thread "Daemon health stats" java.lang.OutOfMemoryError: Java heap space

Hi,
The environment variable you defined is only applicable to the SonarScanner CLI.
Looks like you’re using the scanner for gradle, in which case you should configure Gradle with different JVM memory settings. See here.