java.lang.OutOfMemoryError:Java heap space

Template for a good bug report, formatted with Markdown:

  • versions used (SonarQube, Scanner, Plugin, and any relevant extension)
  • error observed (wrap logs/code around triple quote ``` for proper formatting)
  • steps to reproduce
  • potential workaround

P.S.: use the #bug:fault sub-category if you’re hitting a specific crash/error , or the #bug:fp sub-category for rules-related behaviour

SonarQube Enterprise Edition
SonarQube Version - 8.9LTS

I have tried the following command in pipeline


Also tried the same thing in Environmental variable. Still getting this error. Please help


You may need to try setting a higher value.


Thanks for the quick reply. But 8GB should be enough. So there’s no approach other than this?

How big is your code base?

It is 40 MB

What else can be done?


I’ve already given you my best answer.


Finally I got where I need to provide the command. But now I am getting this error -

##[error]The specified size exceeds the maximum representable size.

Could you please help me.(java 64 bit I am using)


Are you sure you’re using a 64-bit JVM? Google is telling me that the theoretical max heap size for 64-bit is 16 Exabytes & in reality limited by your OS.


The issue got resolved with 512mb