2016-04-05 28 views
0

由於我們已經從4.5.1升級到Sonar 4.5.6,所以我們一直在有很多測試的版本中發生內存不足錯誤。構建可以在舊4.5.1服務器上正常運行,但對4.5.6服務器始終失敗。Sonar 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 [email protected] 
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 

我真的不知道該怎麼做。總內存vs可用內存表示只有140MB在使用之前正在使用,聲納亞軍使用的內存設置是什麼?先謝謝你。

+0

你能分享完整的日誌與調用命令嗎? (也加上'-e'開關) –

+0

看起來這是由於在JDK 7u71上運行聲納亞軍造成的。當我在JDK 8上運行時,它運行良好。 –

回答

0

我發現這個問題與運行聲納亞軍JDK 7u71有關。當我切換到使用​​它沒有用完內存。看着Sonar Requirements documentation,看來你需要JDK 7u75或更高,所以也許這就是爲什麼?