SonarQube Scan Failed

The scan failed because of JavaScript heap out of memory. We tried to set the SONAR_SCANNER_OPTS to 2GB but still having the same issue. Please advise:

  • SonarQube EE 7.7 and sonar-scanner-4.4.1.1530

Hi @toanvo729,

Could you tell us is you have a NODE_OPTIONS environment variable set? If so what is its value?

It should be possible to increase the heap size by setting in your environment NODE_OPTIONS=--max_old_space_size=...

Example:

NODE_OPTIONS=--max_old_space_size=1096 sonar-scanner

If you need a particularly big amount of memory we would be interested in having a minimal reproducer. Knowing the specific file creating this issue would guide us if there is a memory leak. It will probably be a CSS file.

Note that we are currently investigating a similar issue, here is the ticket.

Cheers,

Hi Nicolas,

I don’t have a NODE_OPTIONS set but I can try

I’ll let you know how it goes.

Thank you

set the NODE_OPTIONS to 4gb seems like fixing the issue here.

Thanks again