【问题标题】:SonarQube error: timeout trying to lock table "PROJECT_MEASURES"SonarQube 错误:尝试锁定表“PROJECT_MEASURES”超时
【发布时间】:2016-12-03 07:27:07
【问题描述】:

我有一组使用Ant并行运行的 Jenkins 作业,并将 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

【问题讨论】:

    标签: jenkins ant sonarqube sonar-runner sonarqube-scan


    【解决方案1】:

    升级。

    您没有指定您使用的是哪个版本的 SonarQube,但到了 5.6 版,扫描仪停止直接与数据库对话。因此它不再尝试更新任何表。相反,它会编译一份分析报告,然后将其提交给服务器进行最终处理 => 尝试获取锁不再超时。

    【讨论】:

    • 完美。非常感谢 G. Ann。
    猜你喜欢
    • 2015-07-30
    • 2011-05-08
    • 1970-01-01
    • 2012-11-14
    • 1970-01-01
    • 2021-01-12
    • 2014-09-05
    • 2018-03-26
    相关资源
    最近更新 更多