There is insufficient memory for the Java Runtime Environment to continue.
If you have any errors in sonarQube like below: # There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 37531648 bytes for committing reserved memory.
Please apply below fix highlighted in yellow for any memory issus in SonarQube
The fix should be applied in sonar.properties file. you need to add below lines in appropriate places. 1. Login to SonarQube using GitBash or ITerm 2. open the below file and make the changes highligted in yellow color. sudo vi /opt/sonarqube/conf/sonar.properties
#----------------------------- ------------------------------ ------------------------------ ---------
# WEB SERVER
# Web server is executed in a dedicated Java process. By default heap
size is 512Mb.
# Use the following property to customize JVM options.
# Recommendations:
#
sonar.web.javaOpts=-Xmx512m -Xms512m -XX:+HeapDumpOnOutOfMemoryErro r
#----------------------------- ------------------------------ ------------------------------ ---------
# COMPUTE ENGINE
# The Compute Engine is responsible for processing background tasks.
# Compute Engine is executed in a dedicated Java process. Default heap
size is 512Mb.
# Use the following property to customize JVM options.
# Recommendations:
sonar.ce.javaOpts=-Xmx512m -Xms512m -XX:+HeapDumpOnOutOfMemoryErro r
# WEB SERVER
# Web server is executed in a dedicated Java process. By default heap
size is 512Mb.
# Use the following property to customize JVM options.
# Recommendations:
#
sonar.web.javaOpts=-Xmx512m -Xms512m -XX:+HeapDumpOnOutOfMemoryErro
#-----------------------------
# COMPUTE ENGINE
# The Compute Engine is responsible for processing background tasks.
# Compute Engine is executed in a dedicated Java process. Default heap
size is 512Mb.
# Use the following property to customize JVM options.
# Recommendations:
sonar.ce.javaOpts=-Xmx512m -Xms512m -XX:+HeapDumpOnOutOfMemoryErro