Start Free
SonarQube Community Build | Server upgrade and maintenance | Troubleshooting | Database-related issues

Troubleshooting database-related issues

On this page

The first thing to do is check your server logs.

Timeout issues when setting up Database Connection Pool

In some configurations when there is a firewall between SonarQube Community Build 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 HikariCP 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 here using the following naming convention: sonar.jdbc.{HikariCP property name}.

Issues with MS SQL Server connection

HikariCP may get exhausted from connections causing SonarQube Community Build 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 HikariCP 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 Pre-installation steps on Linux.

Connectivity issue between SonarQube Community Build 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.


Was this page helpful?

© 2008-2024 SonarSource SA. All rights reserved. SONAR, SONARSOURCE, SONARQUBE, and CLEAN AS YOU CODE are trademarks of SonarSource SA.

Creative Commons License