influxdb icon indicating copy to clipboard operation
influxdb copied to clipboard

After restarting Influxdb Data present on disk but Not queryable

Open singhankur opened this issue 8 years ago • 12 comments

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

singhankur avatar Jul 18 '18 13:07 singhankur

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.

amanmj avatar Jul 18 '18 16:07 amanmj

Same here. Maybe it's linked to https://github.com/influxdata/influxdb/issues/10093 ?

phmaes avatar Jul 19 '18 09:07 phmaes

@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 avatar Jul 23 '18 14:07 e-dard

@e-dard we have created it correctly as it was working fine until a couple of weeks after which this problem started to exacerbate .

amanmj avatar Jul 23 '18 15:07 amanmj

@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 avatar Jul 24 '18 06:07 singhankur

@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:

  1. Stop influxdb
  2. sudo runuser -l influxdb -c 'influx_inspect buildtsi -datadir ~/.influxdb/data -waldir ~/.influxdb/wal'
  3. update /etc/influxdb/influxdb.conf with the value index-version = "tsi1"
  4. Start influxdb.

e-dard avatar Jul 24 '18 10:07 e-dard

@e-dard Followed the same steps But today influx restarted data loss again

singhankur avatar Jul 25 '18 03:07 singhankur

@singhankur can you upgrade to 1.6 and provide the logs from startup?

e-dard avatar Jul 26 '18 09:07 e-dard

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

PugachevDK avatar Aug 14 '18 14:08 PugachevDK

Had the same issue in 1.5.4. Upgraded to 1.6.2 and rebuilt the all indexes, data is queryable again.

tarvip avatar Sep 05 '18 05:09 tarvip

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.

stale[bot] avatar Jul 24 '19 14:07 stale[bot]

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.

stale[bot] avatar Jul 31 '19 15:07 stale[bot]