Thank you for reporting this issue. We did a change on the scanner in v4.6 which is removing a default setting forcing the JVM size to be 1GB because when the parameter is not forced, the JVM defaults to 1/4 of the available memory which seemed to be a better default most of the time. It seems that on your case this new default is less favorable.
You can set the SONAR_SCANNER_OPTS environment variable to -Xmx1024m (or to any higher value) to allow the JVM to have more memory.
Thanks for your quick response.
I did try setting this (on the machine where SonarQube is installed) to -Xmx512m and it didn’t seem to effect anything. It was still reporting 247M in my error. I’m pretty sure that I restarted SonarQube too.
Is there anything else I need to do?
The error you are seeing happens with the scanner, not with SonarQube.
The environment variable should be set in the machine where the scan is executed.
I’ve added the environment variable to the machine where the scan is executed and this is now working successfully. I did wonder if I was setting it on the wrong machine!
Thanks both for your helping me to resolve this issue.