GC overhead limit exceeded running background task

2020-03-26 06:31发布

I am running SonarQube 5.5 with the following wrapper config settings.

wrapper.java.initmemory=3
wrapper.java.maxmemory=4096

I am still getting the following stack trace, this project has run successfully with sonarqube 5.3.

2016.05.09 11:14:09 INFO  [o.s.s.c.s.ComputationStepExecutor] Compute coverage measures | time=105ms
2016.05.09 11:14:09 INFO  [o.s.s.c.s.ComputationStepExecutor] Compute comment measures | time=120ms
2016.05.09 11:14:14 INFO  [o.s.s.c.s.ComputationStepExecutor] Copy custom measures | time=5667ms
2016.05.09 11:14:15 INFO  [o.s.s.c.s.ComputationStepExecutor] Compute duplication measures | time=424ms
2016.05.09 11:14:26 ERROR [o.s.s.c.c.ComputeEngineContainerImpl] Cleanup of container failed
java.lang.OutOfMemoryError: GC overhead limit exceeded
2016.05.09 11:14:26 ERROR [o.s.s.c.t.CeWorkerCallableImpl] Failed to execute task AVSWNiXkOySW07vtMalp
java.lang.OutOfMemoryError: GC overhead limit exceeded
    at java.util.Arrays.copyOfRange(Arrays.java:3664) ~[na:1.8.0_45]
    at java.lang.StringBuffer.toString(StringBuffer.java:671) ~[na:1.8.0_45]
    at java.io.StringWriter.toString(StringWriter.java:210) ~[na:1.8.0_45]
    at org.apache.commons.lang.Entities.escape(Entities.java:838) ~[commons-lang-2.6.jar:2.6]
    at org.apache.commons.lang.StringEscapeUtils.escapeXml(StringEscapeUtils.java:620) ~[commons-lang-2.6.jar:2.6]
    at org.sonar.server.computation.step.DuplicationDataMeasuresStep$DuplicationVisitor.appendDuplication(DuplicationDataMeasuresStep.java:129) ~[sonar-server-5.5.jar:na]

1条回答
我命由我不由天
2楼-- · 2020-03-26 07:33

Memory adjustments must be made in sonar.properties:

  • sonar.web.javaOpts (for Web Server JVM)
  • sonar.ce.javaOpts (for Compute Engine JVM)
  • sonar.search.javaOpts (for JVM running ElasticSearch).

In your case the memory exception occurs in a background task so it relates to Compute Engine (see SonarQube architecture for more insight).

Settings in wrapper.conf are not relevant here and should be left untouched (hence the # DO NOT EDIT THE FOLLOWING SECTIONS warning in the file).

查看更多
登录 后发表回答