Record is missing label timeRangeStart/timeRangeStop

Image 1: initially all the data shows on the dashboard (12/08/2022 12:54)

Image 2: after a while, all widgets crash (within minutes) (12/08/2022 12:55)

Hi folks,

Here is some background about my setup:

  • There is an MQTT network sending IoT data to a raspberry Pi
  • raspberry pi runs a python script to upload data to influxdb (in real time)
  • currently uploading data every 3s
  • each upload is a list of lines, each line being measurement/tag_set/field_set/timestamp format
  • upload method is by using python paho mqtt, and line protocol

Essentially, this setup now works, data is at the database, and it is being visualized in a dashboard. However, when refreshing the dashboard at a quick rate (e.g. refreshing every 1 second), it works for 5 minutes and then shows these errors. When I go inside a widget, I cannot submit a new query and cannot see any raw data anymore… It’s like a timerangestart and timerangestop data goes missing…
The dashboard works once again after the page is refreshed. So I am really confused on why that happens, what caused it, and how to fix it. I found only one similar error on this forum, but the one I am currently facing is time - based! This issue only occurs after a few minutes of working successfully!

Note: I now realize that refreshing every 1s gives this error in a couple of minutes, refreshing every 5s gives the error within ~20 minutes, refreshing every 10s gives the error within less than an hour… It’s almost as if some limit is reached, and refreshing the page is the fix. An odd problem!

Any help would be much appreciated!

@matassabaliauskas This is definitely a bug. InfluxDB injects a v record that contains all the dashboard variables for the query. For example:

v = {
    timeRangeStart: -1d,
    timeRangeStop: now(),
    windowPeriod: 1m,

This error indicates that this record isn’t being injected into the query before it gets executed. I’d suggest filing an issue on the InfluxDB repo.

Hi @scott , thanks for the reply. Yeah, it seems like it :frowning:
All these queries used for dashboard are pre-defined, so I did not mess up any of the settings. An odd thing to note is:

  • The dashboard crashes
  • I go to configure the widget
  • I go to script editor
  • When I click submit, I get that error message
  • So it seems like the actual piece of data just disappears or something like that
  • The script looks like this:

from(bucket: “windows-test”)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r[“_measurement”] == “B1”)
|> filter(fn: (r) => r[“_field”] == “SOS”)
|> filter(fn: (r) => r[“gatewayID”] == “2224750077” or r[“gatewayID”] == “672642813” or r[“gatewayID”] == “1620950009” or r[“gatewayID”] == “2224766301” or r[“gatewayID”] == “302301905” or r[“gatewayID”] == “302308233”)
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
|> yield(name: “mean”)

You should submit a bug report on the InfluxDB repo with all of these details. That will allow to InfluxData engineers to troubleshoot and triage what exactly is going on.

@scott yeah that’s fair enough, I did that just now. Thanks for the response ! :slight_smile: Much appreciated.