【问题标题】:sonarqube store results in database takes way too longsonarqube 将结果存储在数据库中花费的时间太长
【发布时间】:2016-10-21 14:15:20
【问题描述】:

SonarQube 需要很长时间,大约 40 到 50 分钟才能将声纳结果传输到 sonarqube mySQL 数据库。

Jenkins 日志:

06:44:33.974 INFO  - Execute decorators...
06:47:01.532 INFO  - Store results in database
07:26:44.253 INFO  - ANALYSIS SUCCESSFUL, you can browse https://....

build.gradle

plugins {
    id "org.sonarqube" version "2.0.1"
}

gradle.properties

systemProp.sonar.host.url=https://myhost/prod
systemProp.sonar.jdbc.url=jdbc:mysql://myhost:port/sonar_prod?useUnicode=true&characterEncoding=utf8
systemProp.sonar.jdbc.driver=com.mysql.jdbc.Driver
systemProp.sonar.jdbc.username=user
systemProp.sonar.jdbc.password= somepassword

这可能是什么问题?

【问题讨论】:

    标签: mysql gradle sonarqube sonarqube-scan


    【解决方案1】:

    找到了解决方案,问题出在我的 jdbc 配置上。改变它就行了。

    sonar.jdbc.url=jdbc:mysql://myHost:port/sonar_prod?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&connectTimeout=0&socketTimeout=0&autoReconnect=true 

    【讨论】:

      【解决方案2】:

      这里的信息太少,无法诊断您的问题。但是,有很多建议可以解决:升级您的 SonarQube 版本。

      5.6 是新的 LTS,除此之外,它消除了扫描仪和数据库之间的所有直接通信。您在分析中仍然有这一步的事实告诉我,您使用的是相当旧的版本,并且可以升级。

      【讨论】:

      • 好吧,我无法升级。这就是我的起源现在所拥有的,他们在升级到新版本之前会花时间测试新版本。
      【解决方案3】:
      sonar.jdbc.url=jdbc:mysql://myHost:port/sonar_prod?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&connectTimeout=0&socketTimeout=0&autoReconnect=true 
      

      这个选项对我有帮助

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2023-04-06
        • 2017-11-17
        • 1970-01-01
        相关资源
        最近更新 更多