# Database-related issues

We recommend reading the [server-logs](https://docs.sonarsource.com/sonarqube-community-build/server-update-and-maintenance/troubleshooting/server-logs "mention") first.

## Timeout issues when setting up Database Connection Pool <a href="#time-out-database-connection-pool" id="time-out-database-connection-pool"></a>

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](https://github.com/brettwooldridge/HikariCP#gear-configuration-knobs-baby) settings to the defaults listed below to avoid timeout isssues.

```css-79elbk
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](https://github.com/brettwooldridge/HikariCP#frequently-used) using the following naming convention: `sonar.jdbc.{HikariCP property name}`.

## Issues with MS SQL Server connection <a href="#hikaricp-connection-issue" id="hikaricp-connection-issue"></a>

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](https://github.com/brettwooldridge/HikariCP#gear-configuration-knobs-baby) settings as follows:

```css-79elbk
sonar.jdbc.minIdle=25
sonar.jdbc.maxActive=25
sonar.jdbc.maxLifetime=0
sonar.jdbc.maxWait=30000
```

## Oracle JDBC driver blocked <a href="#oracle-driver-blocked" id="oracle-driver-blocked"></a>

See [#if-oracle](https://docs.sonarsource.com/sonarqube-community-build/server-installation/pre-installation/linux#if-oracle "mention") for more information.

## Connectivity issue between SonarQube Community Build and MS SQL Server <a href="#connectivity-issue" id="connectivity-issue"></a>

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

## Related pages <a href="#related-pages" id="related-pages"></a>

* [server-logs](https://docs.sonarsource.com/sonarqube-community-build/server-update-and-maintenance/troubleshooting/server-logs "mention")
* [performance-issues](https://docs.sonarsource.com/sonarqube-community-build/server-update-and-maintenance/troubleshooting/performance-issues "mention")
* [elasticsearch](https://docs.sonarsource.com/sonarqube-community-build/server-update-and-maintenance/troubleshooting/elasticsearch "mention")
