Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SonarQube java.lang.OutOfMemoryError: GC overhead limit exceeded

I am getting OutOfMemoryException while performing sonar analysis on my project. Jenkins job shows analysis report was generated successfully but during background task in SonarQube it is failing with below exception.,

2016.08.24 10:55:52 INFO  [o.s.s.c.s.ComputationStepExecutor] Compute comment measures | time=14ms
2016.08.24 10:56:01 INFO  [o.s.s.c.s.ComputationStepExecutor] Copy custom measures | time=9075ms
2016.08.24 10:56:02 INFO  [o.s.s.c.s.ComputationStepExecutor] Compute duplication measures | time=150ms
2016.08.24 10:56:34 ERROR [o.s.s.c.c.ComputeEngineContainerImpl] Cleanup of container failed
java.lang.OutOfMemoryError: GC overhead limit exceeded
2016.08.24 10:56:34 ERROR [o.s.s.c.t.CeWorkerCallableImpl] Failed to execute task AVa6eX7gdswG1hqK_Vvc
java.lang.OutOfMemoryError: Java heap space
2016.08.24 10:56:34 ERROR [o.s.s.c.t.CeWorkerCallableImpl] Executed task | project=iServe | id=AVa6eX7gdswG1hqK_Vvc | time=53577ms
like image 256
Sri Avatar asked Aug 24 '16 03:08

Sri


1 Answers

I use docker-compose and this option works perfectly for me.

version: "2"

services:
  sonarqube:
    image: sonarqube
    command: -Dsonar.ce.javaOpts=-Xmx4096m

You can costumize the memory size.

like image 175
Arief Karfianto Avatar answered Oct 18 '22 15:10

Arief Karfianto