After restarting Influxdb Data present on disk but Not queryable
Influxdb version 1.5.1
index-version = "tsi1"
Influxdb is restarted because of fatal error: runtime: out of memory, this is caused by some lvl=warn msg="Detected slow query:
after this influxdb service is down, then after restarting the influx via command
sudo service influxdb start
Data for all databases is present in data directory
but for few databases the data is not queryable,
while accessing via query. No result is returned
when the restart happens, for the problematic databases data is only present from the beginning of the day when the influxdb got restarted
Facing the same issue! Some of the databases are able to load whole data , but for some databases I see data is not loaded before a particular date. And data is present on the disk for the all dates.
Same here. Maybe it's linked to https://github.com/influxdata/influxdb/issues/10093 ?
@singhankur @amanmj did you correctly create the TSI indexes before changing to the tsi1 index? If you change to index-version = "inmem" and restart the database does your data return?
@e-dard we have created it correctly as it was working fine until a couple of weeks after which this problem started to exacerbate .
@e-dard
I have followed these steps
1 | update /etc/influxdb/influxdb.conf with the value index-version = "tsi1".
2 | Restart influxdb
3 | $ sudo runuser -l influxdb -c 'influx_inspect buildtsi -datadir ~/.influxdb/data -waldir ~/.influxdb/wal'
All commands run without an issus How to verify that TSI index is correctly done
other utility command and their output
$ sudo -H -u influxdb bash -c 'influx_inspect report'
report: lstat : no such file or directory
$ sudo -H -u influxdb bash -c 'influx_inspect verify'
panic: lstat /var/lib/influxdb/.influxdb/data: no such file or directory
goroutine 1 [running]: github.com/influxdata/influxdb/cmd/influx_inspect/verify.(*Command).Run(0xc4200e2d80, 0xc42000c070, 0x0, 0x0, 0x1, 0x954aa0) /go/src/github.com/influxdata/influxdb/cmd/influx_inspect/verify/verify.go:65 +0xdcb main.(*Main).Run(0xc42005df38, 0xc42000c070, 0x0, 0x0, 0xc420014ea0, 0x770808) /go/src/github.com/influxdata/influxdb/cmd/influx_inspect/main.go:88 +0xaad main.main() /go/src/github.com/influxdata/influxdb/cmd/influx_inspect/main.go:23 +0x16c
@singhankur Is your data dir /var/lib/influxdb or ~/.influxdb? It can't be both.
You should not have influxdb running when you build the indexes. The steps should be:
- Stop influxdb
sudo runuser -l influxdb -c 'influx_inspect buildtsi -datadir ~/.influxdb/data -waldir ~/.influxdb/wal'- update
/etc/influxdb/influxdb.conf with the value index-version = "tsi1" - Start influxdb.
@e-dard Followed the same steps But today influx restarted data loss again
@singhankur can you upgrade to 1.6 and provide the logs from startup?
Hi,
influxdb on windows index-version = "tsi1" after upgrade from 1.5.4 to 1.6.1 some old data not queryable while accessing via query.
.\influx.exe -port 5450 -database archive -precision 'rfc3339'
> select * from flow where time < '2018-08-13T00:00:05Z' and position = 'UOS:11-19.PI813.P'
name: flow
time position slice stat val
---- -------- ----- ---- ---
2018-08-13T00:00:00.1095944Z UOS:11-19.PI813.P 0 192 22.5996246337891
2018-08-13T00:00:01.1166951Z UOS:11-19.PI813.P 0 192 22.5951080322266
2018-08-13T00:00:02.1087943Z UOS:11-19.PI813.P 0 192 22.6026992797852
2018-08-13T00:00:03.1148949Z UOS:11-19.PI813.P 0 192 22.5994567871094
2018-08-13T00:00:04.1139948Z UOS:11-19.PI813.P 0 192 22.5954513549805
Had the same issue in 1.5.4. Upgraded to 1.6.2 and rebuilt the all indexes, data is queryable again.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had recent activity. Please reopen if this issue is still important to you. Thank you for your contributions.