2016-07-28 28 views
1

Ich habe eine Reihe von Jenkins Jobs, die laufen parallelAnt mit und JUnit und statische Analyseergebnisse zu Sonarqube hochladen.Sonarqube Fehler: Timeout versucht Tabelle „PROJECT_MEASURES“ zu sperren

Ich sehe den Fehler unten häufig. Ich sah eine andere Frage zu diesem here. Die Lösung war, die Ausführung von Sonar zu serialisieren. Dies ist jedoch keine Option für mich, da dies meine Builds erheblich verlangsamen würde.

Irgendwelche anderen Lösungen?

[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 

Antwort

3

Upgrade.

Sie geben nicht an, welche Version von SonarQube Sie verwenden, aber mit 5.6 hat der Scanner nicht mehr direkt mit der Datenbank gesprochen. Es versucht also nicht mehr, Tabellen zu aktualisieren. Stattdessen wird ein Analysebericht erstellt, der dann zur endgültigen Verarbeitung an den Server gesendet wird => keine Zeitüberschreitungen mehr, die versuchen, Sperren zu erhalten.

+0

Perfekt. Vielen Dank G. Ann. – Phil