gpt4 book ai didi

java - SonarQube 中的连接池配置/错误

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:24:49 24 4
gpt4 key购买 nike

我的日志中有时会出现以下错误:

Error querying database. Cause: org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object

The error may exist in org.sonar.core.issue.db.ActionPlanMapper

The error may involve org.sonar.core.issue.db.ActionPlanMapper.findByKeys

The error occurred while executing a query

我应该如何调整我的连接池设置,以便不再发生这种情况?

sonar.jdbc.maxActive=25
sonar.jdbc.maxIdle=5
sonar.jdbc.minIdle=2
sonar.jdbc.maxWait=15000
sonar.jdbc.minEvictableIdleTimeMillis=600000
sonar.jdbc.timeBetweenEvictionRunsMillis=30000

最佳答案

根据 http://jira.codehaus.org/browse/SONAR-188,您可以尝试更新文件中的连接设置:conf/sonar.properties 添加“自动重新连接”。

示例:

sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8?autoReconnect=true

关于java - SonarQube 中的连接池配置/错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23011675/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com