The properties sonar.jdbc.maxActive and sonar.jdbc.maxWait are documented in sonar.properties but are unexpectedly ignored in version 7.4. The default value of sonar.jdbc.maxActive also dropped from 60 to 8. That aims to a significant decrease of the capability to sustain the HTTP load.
The bug was introduced when moving the db connection pool to commons-dbcp. Any property names "sonar.jdbc.*" is passed to the DB pool implementation (after removing "sonar.jdbc.") to tune its configuration.
In sonar.properties, we document the following properties:
Unfortunately, with commons-dbcp:
- maxActive is named maxTotal, and default is 8
- maxWait is named maxWaitMillis
Temporarily set the properties with the commons-dbcp names:
Remove the coupling between user properties ("sonar.jdbc.*) and the pool implementation (commons-dbcp for the time being, may be replaced by HikariCP). Only the properties sonar.jdbc.maxActive and sonar.jdbc.maxWait should be supported.
An integration test should be added to prevent new regressions. A simple test is to check the pool characteristics from the system info web api. It gets the effective values directly from the pool, not from the declared settings.