We are using MySQL as our data source for Grafana dashboards. This is working fine except the following problem that we are experiencing.
Over a period of usage we start getting “Too Many Connections” errors on MySQL. While we are working to increase the number of allowed connections I did have the following questions wrt to the Grafana and MySQL Data source plugin.
If I have two dashboard users concurrently logged into Grafana and each viewing 2 reports each, then what is the expected number of connections to MySQL, is it, one “per report per user” or something else.
When does Grafana open a SQL connection and when does it close it - what is the logic.
For Auto refreshing reports (Example: Last 5 minute data) does Grafana open a SQL connection for every refresh cycle or is there a different logic.
Is it possible to configure/tweak the connection timeout values?
What about connection pooling - is it possible to configure connection pooling for MySQL?