MrHill
MrHill

Reputation: 1271

Connection Pool configuration / error in SonarQube

from time to time I have the following error in my logs:

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

How should I adjust my connection pool settings so that this doesn't occur anymore?

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

Upvotes: 3

Views: 2831

Answers (1)

Gurvan
Gurvan

Reputation: 741

According to http://jira.codehaus.org/browse/SONAR-188, you can try to update your connection settings in file: conf/sonar.properties with adding "autoreconnect".

Example:

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

Upvotes: 2

Related Questions