I am using Ubuntu 12.04
with jenkins as a continuous integration server and have SonarQube
installed and setup. Sonar worked for a large amount of time, but recently the service will shutdown immediately after starting the service. I am using Sonar 5.3 and my server has 4GB RAM where most of the time only 1-2GB are occupied.
The sonar.log
says:
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
I googled for solutions but they suggest to increase the heap-size when starting the .jar file via command line, but the file that defines the sonar-service in /etc/init.d
doesnt even run a .jar file.
This looks like SONAR-7125, fixed in SonarQube 5.4. Workaround is to delete the temp folder manually before restart.