circle-exclamation
This version of the SonarQube documentation is no longer maintained. It relates to a version of SonarQube that is not active.

Database-related issues

Troubleshooting database-related issues.

We recommend reading the Server logs first.

Timeout issues when setting up Database Connection Pool

In some configurations when there is a firewall between SonarQube Server and the data you may experience timeout issues. The firewall may interrupt idle DB connections after a specific timeout which can lead to resetting connections. See also Issues with MS SQL Server connection below.

You can customize the HikariCParrow-up-right settings to the defaults listed below to avoid timeout isssues.

sonar.jdbc.idleTimeout=600000
sonar.jdbc.keepaliveTime=300000
sonar.jdbc.maxLifetime=1800000
sonar.jdbc.validationTimeout=5000

Additionally, it is now possible to configure HikariCP properties described herearrow-up-right using the following naming convention: sonar.jdbc.{HikariCP property name}.

Issues with MS SQL Server connection

HikariCP may get exhausted from connections causing SonarQube Server to be unresponsive. In this case, the error may display something like HikariPool-1 - Connection is not available or HikariPool-1 - Cannot acquire connection from data source.

In this case, customize the HikariCParrow-up-right settings as follows:

sonar.jdbc.minIdle=25
sonar.jdbc.maxActive=25
sonar.jdbc.maxLifetime=0
sonar.jdbc.maxWait=30000

Oracle JDBC driver blocked

See If using an Oracle database in On Linux systems.

Connectivity issue between SonarQube Server and MS SQL Server

If the TCP/IP connection is refused, make sure that Named Pipes and TCP/IP connections are enabled on your SQL Server.

Duplicate keys during background task processing after upgrading to RHEL 8

If you performed an in-place OS upgrade to RHEL 8 or with any similar operating systemsarrow-up-right and you use PostgreSQL, the new version of glibc may affect locale data changes.

To prevent this, avoid in-place OS upgrades and perform dump-and-restore of the database to an already-upgraded OS.

To correct the issue, restore from a known good backup copy of the database and perform the maintenance steps:

Last updated

Was this helpful?