Communication problems and request errors between Grafana and MySQL database

Hello, I just joined the Grafana Community and have a question. I have built a dashboard containing a number of panels. Each panel represents a query to a MySQL database. I have set the refresh interval of the dashboard to 5 seconds. Does this mean that every 5 seconds all my panel queries are executed in the database? My queries involve all of the rows of large tables and have long execution times. I experience a lot of communication problems with the database and get ‘Request Error’ messages in the dashboard panels.

Kind regards, Jurgen Runge

Hello, I just joined the Grafana Community and have a question. I have
built a dashboard containing a number of panels. Each panel represents a
query to a MySQL database. I have set the refresh interval of the
dashboard to 5 seconds. Does this mean that every 5 seconds all my panel
queries are executed in the database?

Yes. You should be able to see this in your MySQL performance logs.

My queries involve all of the rows of large tables and have long execution
times.

It sounds as though you might benefit from some database optimisation, unless
you’ve already taken that as far as possible, and better hardware is the only
remaining solution.

I experience a lot of communication problems with the database

Because of the network or the database server?

and get ‘Request Error’ messages in the dashboard panels.

I have suggested the ability to set refresh intervals per panel in the same
way as time ranges can be altered.

Regards,

Antony.

Thank you Antony for your swift and detailed answer. By communication problems with the database I mean that during a grafana session the number of clients connections to the database rise very fast and reach the maxium allowed number. After that I get request error messages in my dashboard. I think the problem is that with a refresh period of 5 seconds queries to the database are still running when a new set of queries is started, resulting in congestion. I have set the refresh period to a higher value, e.g. 1 minute, and the error messages stay away. Furthermore I have limited the time range possibilities by restricting the number of rows fetched from tables.