我有一组Jenkins作业,由使用Ant并行运行,并将JUnit和静态分析结果上传到SonarQube。
我经常看到下面的错误。我看到了关于这个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 : org.sonar.api.resources.Project@6598c5f6[id=2736,key=com.ibm.cloud.cms.halos.acp.task.manager,qualifier=TRK], with key batch-com.ibm.cloud.cms.halos.acp.task.manager发布于 2016-07-28 19:12:50
升级。
您没有指定您使用的是哪个版本的SonarQube,但是到了5.6,扫描仪就停止了直接与数据库的对话。因此,它不再试图更新任何表。相反,它编译了一个分析报告,然后将分析报告提交给服务器,以便最终处理=>,不再有试图获取锁的超时。
https://stackoverflow.com/questions/38644239
复制相似问题