Very high refresh time

Hello everyone,

I have some dashboards to monitor the state of my routers. But those dashboards take a very long time to load, and then a very long time to refresh. For example, after waiting around 10 minutes for the dashboard to load, nothing happens. I came back after meals and it was loaded. Then the refresh of every panels can take up to 2-3 minutes…
I’m working with InfluxDB V1 and I don’t think I can optimize any more my different queries.


update
Some times (randomly), after refreshing (waiting for 3-4 minutes), my panels shows the value “No data”. After looking at the Grafana query parameters there’s an error on the query.
After checking the Grafana logs:

logger=tsdb.mysql endpoint=queryData pluginId=mysql dsName=mysql dsUID=e6f5a95d-f6f4-419e-9c28-c306984522d8 uname=admin t=2024-04-26T08:37:13.329145697+02:00 level=error msg="Query error" error="Error 1040: Too many connections"
logger=tsdb.mysql endpoint=queryData pluginId=mysql dsName=mysql dsUID=e6f5a95d-f6f4-419e-9c28-c306984522d8 uname=admin t=2024-04-26T08:37:13.329764046+02:00 level=error msg="Query error" error="Error 1040 (08004): Too many connections"

Any hint on how to reduce this time?

Best regards

Not the solution I was hoping to find, but I guess Grafana is struggling with very big database (as even mariadb is struggling) and my base was over 8 millions rows with 9 columns:

Since my different panels only needed data over 1 weeks, I build a script to erase data over 8 days. This still take a while to fetch the data, but at least I got something!

That’s not a big database. It looks like you may have poor DB table design, ineffecient query, limited resources, incorrect config,…

1 Like

I’ve structured my queries differently, avoiding heavy operations like SELECT *. As a result, my VM never reaches 100% CPU usage, typically hovering between 1% and 5%, with a peak at 85% before I removed a large portion of the database.

The RAM usage remains stable at around 33%.

Additionally, I’ve implemented three indexes on my table.

As for any incorrect configurations, I’m not entirely sure. I’m still learning and not very experienced with databases, being a student.