When I try to load my Grafana dashboard today, it immediately freezes and the page becomes unresponsive. I can’t click anything. Only a couple panels show data before it freezes, and the rest of the panels are stuck with the rotating arrows.
I have not changed anything on the dashboard recently. It was working fine the last couple days. My browser is up to date Chrome.
How do I fix this? How do I determine what is causing the problem? I opened Chrome dev tools and don’t see any errors in the console. Is there a log somewhere?
I only have the Stat Panel and DataTables plugins installed. I saw the DataTables plugin was unsigned, so I removed it from the Grafana account settings page thinking maybe that was the problem, but no change. I am using the latest version of Grafana.
When I opened my laptop, I happened to have a tab open with my Grafana dashboard that had been there a few days. On another tab, I copied over one panel at a time to see what the problem was. Sure enough, I have 2 stat panels that both cause the page to freeze immediately. Both are a time series. I was able to grab the json for the entire dashboard from my tab that hadn’t been refreshed. If I omit the two stat panels causing issues, I can import the whole dashboard as a new dashboard and all works great.
I did a quick test with a new stat panel. The query is:
SELECT
created AS "time",
field2
FROM table_name
WHERE
$__timeFilter(created)
If field2 returns a null value (or maybe it is if all the values are null?), it immediately freezes.
So this does sound like this may be the same bug @fe1lann mentioned.
I did notice however, if the above query does not return a null value for field2, the stat panel shows No Data. I know the query should return rows. I have the stat panel calculation set to Count. Not sure if there is an issue with the $__timeFilter() or if something changed with the latest version? Maybe it’s all related to the same bug?
Actually figured out my stat panel “no data” issue. For a workaround, since I am just counting rows returned, I just updated my query to:
SELECT
created AS "time", 1
FROM table_name
WHERE
$__timeFilter(created)
If the field2 column was not numeric, I was getting No Data. So I just set it to 1, and it works great. If I set it to 0 instead of 1, it freezes, so the bug mentioned above is definitely the issue.