Idle PostgreSQL connections from Grafana if autorefresh ON

Using Grafana Cloud Free. Have set up a dashboard and a data source is PostgreSQl hosted on elephantsql.com. Service limits a user to have 5 ocnnections at the same time, but grafana keeps creating connections without closing it if autorefresh ON or if I refresh very fast:

And after some time I get next error message:
image

The number of connections is set to 10 for sql datasources in grafana. But this number is not configurable:

Thank you @svenklemm for the answer! What is the purpose to keep a connection open and at the same time open another one?

To query data for different panels in parallel. Or if a panel has multiple queries do those in parallel aswell.

1 Like

v5.2.2 fixes a bug which could cause postgres/mysql/mssql datasources to leak connections, see https://github.com/grafana/grafana/issues/12636.

Marcus