influxdata / influxdata/influxdb
Continuous queries stop working after a few minutes
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
I am creating the following queries on my InfluxDB on the telegraf database.
CREATE CONTINUOUS QUERY "cq_agg_in" ON telegraf BEGIN SELECT non_negative_derivative(mean("/interfaces/interface/state/counters/in-octets"), 1s) * 8 AS agg_in INTO telegraf."26_week".aggregate FROM telegraf."26_week"."/interfaces/" GROUP BY time(30s), "/interfaces/interface/@name", device, "/interfaces/interface/state/parent_ae_name", RouterAe END
CREATE CONTINUOUS QUERY "cq_agg_out" ON telegraf BEGIN SELECT non_negative_derivative(mean("/interfaces/interface/state/counters/out-octets"), 1s) * 8 AS agg_out INTO telegraf."26_week".aggregate FROM telegraf."26_week"."/interfaces/" GROUP BY time(30s), "/interfaces/interface/@name", device, "/interfaces/interface/state/parent_ae_name", RouterAe END
The queries are running for a few minutes after that they are stopping.
Please note that this queries are already working on a different server.
```
> show diagnostics
name: build
Branch Build Time Commit Version
------ ---------- ------ -------
1.8 v1.8.6 1.8.6
name: config
bind-address reporting-disabled
------------ ------------------
127.0.0.1:8088 false
name: config-coordinator
log-queries-after max-concurrent-queries max-select-buckets max-select-point max-select-series query-timeout write-timeout
----------------- ---------------------- ------------------ ---------------- ----------------- ------------- -------------
0s 0 0 0 0 0s 10s
name: config-cqs
enabled query-stats-enabled run-interval
------- ------------------- ------------
true false 1s
name: config-data
cache-max-memory-size cache-snapshot-memory-size cache-snapshot-write-cold-duration compact-full-write-cold-duration dir max-concurrent-compactions max-index-log-file-size max-series-per-database max-values-per-tag series-file-max-concurrent-compactions series-id-set-cache-size strict-error-handling wal-dir wal-fsync-delay
--------------------- -------------------------- ---------------------------------- -------------------------------- --- -------------------------- ----------------------- ----------------------- ------------------ -------------------------------------- ------------------------ --------------------- ------- ---------------
3221225472 26214400 10m0s 4h0m0s /var/lib/influxdb/data 0 1048576 0 0 0 100 false /var/lib/influxdb/wal 0s
name: config-httpd
access-log-path bind-address enabled https-enabled max-connection-limit max-row-limit
--------------- ------------ ------- ------------- -------------------- -------------
:8086 true false 0 0
name: config-meta
dir
---
/var/lib/influxdb/meta
name: config-monitor
store-database store-enabled store-interval
-------------- ------------- --------------
_internal true 10s
name: config-precreator
advance-period check-interval enabled
-------------- -------------- -------
30m0s 10m0s true
name: config-retention
check-interval enabled
-------------- -------
30m0s true
name: config-subscriber
enabled http-timeout write-buffer-size write-concurrency
------- ------------ ----------------- -----------------
true 30s 1000 40
name: network
hostname
--------
nlrtm1-telemetry1
name: runtime
GOARCH GOMAXPROCS GOOS version
------ ---------- ---- -------
amd64 96 linux go1.13.8
name: system
PID currentTime started uptime
--- ----------- ------- ------
11813 2021-07-15T12:22:37.696464561Z 2021-07-15T11:40:14.124164279Z 42m23.572300282s
```
Contributor guide
Research direction
Start by reproducing the two CREATE CONTINUOUS QUERY statements on InfluxDB 1.8.6 using the provided telegraf database and diagnostics output. Check when the queries stop and use the continuous-query configuration and server state to investigate; done means identifying the cause and documenting a verified fix or workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100