【问题标题】:Sonar 4.5.6 ignoring memory settings and getting out of memorySonar 4.5.6 忽略内存设置并内存不足
【发布时间】:2016-04-06 00:50:06
【问题描述】:

自从我们从 4.5.1 升级到 Sonar 4.5.6 以来,我们一直在进行大量测试的构建中出现内存不足错误。构建在旧的 4.5.1 服务器上运行良好,但在 4.5.6 服务器上始终失败。

我们使用 sonar:sonar 目标通过 Maven 3.2.3 和 JDK 7 运行 Sonar。我尝试将MAVEN_OPTSSONAR_RUNNER_OPTS 设置为-Xms128m -Xmx1024m -XX:MaxPermSize=512m。我也试过-Xmx2048m。我们继续解决内存不足的问题。

04-Apr-2016 16:48:25    [ERROR] [16:48:25.872] Class not found: java.lang.annotation.Repeatable
04-Apr-2016 16:48:25    [ERROR] [16:48:25.961] Class not found: java.lang.annotation.Repeatable
04-Apr-2016 16:48:26    [ERROR] [16:48:26.541] Class not found: javax.annotation.Nullable
04-Apr-2016 16:48:26    [ERROR] [16:48:26.701] Class not found: javax.annotation.Nullable
04-Apr-2016 16:48:26    [ERROR] [16:48:26.701] Class not found: javax.annotation.CheckReturnValue
04-Apr-2016 16:48:26    [ERROR] [16:48:26.838] Class not found: javax.annotation.Nullable
04-Apr-2016 16:48:26    [ERROR] [16:48:26.960] Class not found: javax.annotation.Nullable
04-Apr-2016 16:48:27    [ERROR] [16:48:27.070] Class not found: javax.annotation.Nullable
04-Apr-2016 16:48:28    [ERROR] [16:48:28.055] Class not found: javax.annotation.Nullable
04-Apr-2016 16:48:29    [INFO] [16:48:29.671] Java Test Files AST scan done: 6423 ms
04-Apr-2016 16:48:29    [INFO] [16:48:29.671] 139/139 source files have been analyzed
04-Apr-2016 16:48:29    [INFO] [16:48:29.673] Package design analysis...
04-Apr-2016 16:48:29    [INFO] [16:48:29.947] Package design analysis done: 274 ms
04-Apr-2016 16:48:29    [INFO] [16:48:29.972] Sensor JavaSquidSensor done: 15533 ms
04-Apr-2016 16:48:29    [INFO] [16:48:29.975] Sensor QProfileSensor...
04-Apr-2016 16:48:29    [INFO] [16:48:29.976] Sensor QProfileSensor done: 1 ms
04-Apr-2016 16:48:29    [INFO] [16:48:29.976] Sensor org.sonar.plugins.findbugs.FindbugsSensor@44b9148f...
04-Apr-2016 16:48:29    [INFO] [16:48:29.980] Execute Findbugs 3.0.1...
04-Apr-2016 16:48:30    [INFO] [16:48:30.603] Found findbugs plugin: /<path to project>/target/sonar/findbugs/fb-contrib.jar
04-Apr-2016 16:48:30    [INFO] [16:48:30.603] Findbugs output report: /<path to project>/target/sonar/findbugs-result.xml
04-Apr-2016 16:49:54    [WARN] [16:49:54.965] [JOURNAL_FLUSHER] WARNING Journal flush operation took 2,471ms last 8 cycles average is 360ms
04-Apr-2016 16:50:39    The following classes needed for analysis were missing:
04-Apr-2016 16:50:40      org.jboss.logging.BasicLogger
04-Apr-2016 16:50:42    Out of memory
04-Apr-2016 16:50:45    Total memory: 3650M
04-Apr-2016 16:50:46    free memory: 3510M

我现在真的不确定如何进行。总内存与可用内存表明只有 140MB 正在使用中,声纳运行器使用什么内存设置?提前谢谢你。

【问题讨论】:

  • 您能与调用的命令共享完整日志吗? (同时添加-e 开关)
  • 看起来这是由在 JDK 7u71 上运行声纳运行器引起的。当我在 JDK 8 上运行时,它运行良好。

标签: sonarqube


【解决方案1】:

我发现问题与在 JDK 7u71 上运行声纳转轮有关。当我切换到使用JDK 8 时,它并没有耗尽内存。查看Sonar Requirements documentation,似乎您需要JDK 7u75 或更高版本,所以也许这就是原因?

【讨论】:

  • 我也有类似的问题,请问您有其他解决方案吗?
猜你喜欢
  • 1970-01-01
  • 2020-01-28
  • 1970-01-01
  • 2014-10-15
  • 2021-12-20
  • 2021-10-29
  • 1970-01-01
  • 1970-01-01
  • 2011-05-21
相关资源
最近更新 更多