2016-07-28 21 views
1

我有一組詹金斯喬布斯認爲並行運行使用Ant並上傳JUnit和靜態分析結果SonarQube的。SonarQube錯誤:超時試圖鎖定表「PROJECT_MEASURES」

我看到經常出現下面的錯誤。我看到另一個關於here的問題。解決方案是序列化Sonar的執行。但是,這不是我的選擇,因爲這會顯着減慢我的構建。

其他解決方案?

[sonar:sonar] 20:20:34.362 WARN - SQL Error: 50200, SQLState: HYT00 
[sonar:sonar] 20:20:34.363 ERROR - Timeout trying to lock table "PROJECT_MEASURES"; SQL statement: 
[sonar:sonar] select snapshot1_.created_at as col_0_0_, measuremod0_.metric_id as col_1_0_, measuremod0_.value as col_2_0_ from project_measures measuremod0_, snapshots snapshot1_ where measuremod0_.snapshot_id=snapshot1_.id and snapshot1_.project_id=? and snapshot1_.status=? and snapshot1_.qualifier<>? and (measuremod0_.characteristic_id is null) and (measuremod0_.person_id is null) and (measuremod0_.rule_id is null) and (measuremod0_.rule_priority is null) and (measuremod0_.metric_id in (? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ?)) and snapshot1_.created_at>=? and snapshot1_.created_at<=? order by snapshot1_.created_at [50200-172] 
[sonar:sonar] 20:20:34.390 DEBUG - Release semaphore on project : [email protected][id=2736,key=com.ibm.cloud.cms.halos.acp.task.manager,qualifier=TRK], with key batch-com.ibm.cloud.cms.halos.acp.task.manager 

回答

3

升級。

您不指定您使用的是哪個版本的SonarQube,而是5.6,掃描儀停止直接與數據庫通話。所以它不再嘗試更新任何表。相反,它會編譯一份分析報告,然後提交給服務器進行最終處理=>不再嘗試獲取鎖定超時。

+0

完美。非常感謝G. Ann。 – Phil

相關問題