Menu
Grafana Cloud

Best practices for data source configuration

When using private data source connect (PDC), Grafana sends data source queries via the PDC system. This means that PDC lifecycle events can have an impact on the TCP connections that data sources use for queries.

The PDC system has a graceful shutdown period set to slightly more than 5 minutes. Grafana doesn’t route new connections via a PDC component that’s shutting down but existing TCP connections, reused for more than the graceful shutdown period, risk interruption in the middle of a query.

In this scenario, the queries return an error with a message like Partial data response error or db query error: invalid connection.

Some data sources have configuration to reuse established connections. To avoid having queries by these data sources disrupted by PDC lifecycle events, reduce the maximum connection lifetime on these data sources to less than 5 minutes.

Affected data sources

The following table lists the affected data sources and the configuration field used to modify the maximum connection lifetime:

Data sourceConfiguration field
Microsoft SQL ServerMax lifetime
MySQLMax lifetime
PostgreSQLMax lifetime