> For the complete documentation index, see [llms.txt](https://docs.sonarsource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonarsource.com/sonarqube-server/10.8/server-upgrade-and-maintenance/troubleshooting/database-related-issues.md).

# Database-related issues

Troubleshoot database-related issues in SonarQube Server 10.8, starting with the server logs.

{% hint style="info" %}
**For AI agents:** You're in the SonarQube Server 10.8 documentation. For a list of all 10.8 pages, see the [SonarQube Server 10.8 page index](https://312504542-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiJj3TXBdWssTGGg8qK5I%2Fuploads%2FmeJ1nVNGPezOurNrTy4A%2Fsonarqube-server-10.8-llms.txt?alt=media). For the whole site, see the [page index](https://docs.sonarsource.com/llms.txt) or the [full text](https://docs.sonarsource.com/llms-full.txt). For another version, replace 10.8 in the URL with that version. The [latest version](https://docs.sonarsource.com/sonarqube-server/) has no version number in its URL.
{% endhint %}

The first thing to do is [Checking the server logs](/sonarqube-server/10.8/server-upgrade-and-maintenance/troubleshooting/checking-server-logs.md).

## 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 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 [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 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 [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 using an Oracle database** in [On Linux systems](/sonarqube-server/10.8/setup-and-upgrade/pre-installation/linux.md).

## Connectivity issue between SonarQube Server 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.

## Duplicate keys during background task processing after upgrading to RHEL 8 <a href="#duplicate-keys-after-upgrade" id="duplicate-keys-after-upgrade"></a>

If you performed an in-place OS upgrade to RHEL 8 or [with any similar operating systems](https://wiki.postgresql.org/wiki/Locale_data_changes#What_Linux_distributions_are_affected) 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:

```css-79elbk
VACUUM FULL;
REINDEX DATABASE <database-name>;
ANALYZE;
```

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

* [Checking the server logs](/sonarqube-server/10.8/server-upgrade-and-maintenance/troubleshooting/checking-server-logs.md)
* [Performance issues](/sonarqube-server/10.8/server-upgrade-and-maintenance/troubleshooting/performance-issues.md)
* [Elasticsearch-related issues](/sonarqube-server/10.8/server-upgrade-and-maintenance/troubleshooting/elasticsearch.md)
* [Other issues](/sonarqube-server/10.8/server-upgrade-and-maintenance/troubleshooting/other-issues.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sonarsource.com/sonarqube-server/10.8/server-upgrade-and-maintenance/troubleshooting/database-related-issues.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
