【问题标题】:Start Sonar-Service - java.lang.OutOfMemoryError: GC overhead limit exceeded Ubuntu启动 Sonar-Service - java.lang.OutOfMemoryError: GC 开销限制超出 Ubuntu
【发布时间】:2016-08-12 20:53:25
【问题描述】:

我将 Ubuntu 12.04 与 jenkins 一起用作持续集成服务器,并安装和设置了 SonarQube。声纳工作了很长时间,但最近服务会在启动服务后立即关闭。我使用的是 Sonar 5.3,我的服务器有 4GB 内存,大部分时间只有 1-2GB 被占用。

sonar.log 说:

WrapperSimpleApp: Encountered an error running main: java.lang.OutOfMemoryError: GC overhead limit exceeded
java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.lang.StringCoding$StringDecoder.decode(StringCoding.java:149)
at java.lang.StringCoding.decode(StringCoding.java:193)
at java.lang.String.<init>(String.java:426)
at java.lang.String.<init>(String.java:491)
at java.io.UnixFileSystem.list(Native Method)
at java.io.File.list(File.java:1122)
at java.io.File.listFiles(File.java:1207)
at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1645)
at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1535)
at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2270)
at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1653)
at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1535)
at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2270)
at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1653)
at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1535)
at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2270)
at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1653)
at org.apache.commons.io.FileUtils.deleteQuietly(FileUtils.java:1566)
at org.sonar.application.PropsBuilder.initTempDir(PropsBuilder.java:102)
at org.sonar.application.PropsBuilder.build(PropsBuilder.java:73)
at org.sonar.application.App.main(App.java:115)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
at java.lang.Thread.run(Thread.java:745)
<-- Wrapper Stopped

我搜索了解决方案,但他们建议在通过命令行启动 .jar 文件时增加堆大小,但在 /etc/init.d 中定义声纳服务的文件甚至不运行 .jar 文件。

【问题讨论】:

  • 请分享更多细节:SonarQube 版本?完整的sonar.log? (一行是不够的)你的 Ubuntu 机器上有可用的 RAM 吗?
  • 以下命令 java -XshowSettings:vm 说明如下: Max.堆大小(估计):880.00M。

标签: java ubuntu jenkins sonarqube sonarqube-ops


【解决方案1】:

这看起来像 SONAR-7125,在 SonarQube 5.4 中修复。解决方法是在重启前手动删除临时文件夹。

【讨论】:

  • 谢谢,升级到 SonarQube 5.4 后这个问题解决了!
  • 感谢您提供的解决方法,它真的很有帮助:)
猜你喜欢
  • 2017-12-27
  • 2020-09-08
  • 2020-07-24
  • 1970-01-01
  • 2019-06-29
  • 2015-04-25
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多