I have been running InfluxDB for a long time now, feeding it with the same kind of simple data from Node Red all the time with the same programmatic data: Each measurement has exactly one value column that’s always a number (always a float or always an int, depending on the measurement) and three tags that I actually don’t care about currently
Now from the beginning of querying the data from those measurements with Grafana I always had it happen that the query from Grafana sporadically returned empty results, resulting in a graph showing empty. Just refreshing a second later typically worked - sometimes a different graph issuing another query at that point returned empty then, but mostly all was fine.
Now I have a simple query running from Node Red that started with the same behaviour, just sometimes returning empty so I constructed a loop that just reissued the query with a 3s delay until I got a valid response.
Suddenly even that started to fail though, meaning I would not get a proper response in hours.Today I tried the same queries on the DB host through Influx’s command line tool and I can still see the same issue: Sometimes the query just returns empty, if I press up and enter to reissue the command just below a second later it can start to work. Or the other way round, it works at first then not a second later it fails.
Unfortunately I don’t get any errors while doing so, neither does the InfluxDB journal show anything that stands out to me. Any ideas what’s going wrong or pointers at what to check/try out?
Example of my attempts:
All of those queries happened within at most 10s, so data was always in the range of the filter.
Text version of queries used:
Full:
SELECT mean("value"),max("value") FROM ( SELECT mean("value") AS value FROM "5/0/56" WHERE time > (now()-2m) and time < now() GROUP BY time(10s) fill(previous) ) WHERE time > (now()-2m) and time < now()
Inner only (for checking for actual data existence):
SELECT mean("value") AS value FROM "5/0/56" WHERE time > (now()-2m) and time < now() GROUP BY time(10s) fill(previous)
Cheers,
Chris