influxdb icon indicating copy to clipboard operation
influxdb copied to clipboard

[monitor] YYYY/MM/DD failed to store statistics: timeout

Open just2d opened this issue 10 years ago • 2 comments

after a heavy disk load:

[monitor] YYYY/MM/DD failed to store statistics: timeout

The full db log will be posted below.

version 0.9.6.1 engine:bz1 single-node mode. 8 cpu,16g ram only 2 settings are modified to reduce CQ's execution:

[continuous_queries]
  recompute-no-older-than = "31m"
  compute-runs-per-interval = 2

batch insert with 1000 actions,500ms at the client side.

cq:

name: accessdb
--------------
name            query
cq_key_access_per_1m    CREATE CONTINUOUS QUERY cq_key_access_per_1m ON accessdb BEGIN SELECT sum(u_count) AS "u_count" INTO accessdb._5w_rp.key_access_per_1m FROM accessdb._8h_rp.key_access GROUP BY time(1m), * END
cq_key_access_per_5m    CREATE CONTINUOUS QUERY cq_key_access_per_5m ON accessdb BEGIN SELECT sum(u_count) AS "u_count" INTO accessdb._5w_rp.key_access_per_5m FROM accessdb._8h_rp.key_access GROUP BY time(5m), * END
cq_key_access_per_30m   CREATE CONTINUOUS QUERY cq_key_access_per_30m ON accessdb BEGIN SELECT sum(u_count) AS "u_count" INTO accessdb._5w_rp.key_access_per_30m FROM accessdb._8h_rp.key_access GROUP BY time(30m), * END
cq_key_access_per_60m   CREATE CONTINUOUS QUERY cq_key_access_per_60m ON accessdb BEGIN SELECT sum(u_count) AS "u_count" INTO accessdb._5w_rp.key_access_per_60m FROM accessdb._8h_rp.key_access GROUP BY time(1h), * END

every thing goes well,the cpu,the disk. untill any of these cqs executes, the disk write' i/o raises rapidly, pay attention to Cpu0

top - 23:42:18 up 7 days, 12:01,  3 users,  load average: 0.82, 1.29, 1.36
Tasks: 209 total,   1 running, 208 sleeping,   0 stopped,   0 zombie
Cpu0  :  4.1%us,  3.1%sy,  0.0%ni,  1.0%id, 90.8%wa,  1.0%hi,  0.0%si,  0.0%st
Cpu1  :  1.0%us,  0.0%sy,  0.0%ni, 99.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu2  :  1.0%us,  0.0%sy,  0.0%ni, 99.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu3  :  1.0%us,  1.0%sy,  0.0%ni, 98.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu4  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu5  :  1.0%us,  0.0%sy,  0.0%ni, 99.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu6  :  1.0%us,  0.0%sy,  0.0%ni, 99.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu7  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  16464652k total,  2600532k used, 13864120k free,   284240k buffers
Swap:        0k total,        0k used,        0k free,  1525156k cached

and the disk: "sar -d 1 500"

sar -d 1 500
11:42:58 PM       DEV       tps  rd_sec/s  wr_sec/s  avgrq-sz  avgqu-sz     await     svctm     %util
11:42:59 PM  dev202-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
11:42:59 PM dev202-16   1178.79      0.00   9430.30      8.00      1.30      1.10      0.80     93.74

11:42:59 PM       DEV       tps  rd_sec/s  wr_sec/s  avgrq-sz  avgqu-sz     await     svctm     %util
11:43:00 PM  dev202-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
11:43:00 PM dev202-16   1232.99      0.00   9929.90      8.05      1.67      1.36      0.79     97.11

11:43:00 PM       DEV       tps  rd_sec/s  wr_sec/s  avgrq-sz  avgqu-sz     await     svctm     %util
11:43:01 PM  dev202-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
11:43:01 PM dev202-16   1192.78      0.00   9542.27      8.00      1.52      1.28      0.80     94.95

11:43:01 PM       DEV       tps  rd_sec/s  wr_sec/s  avgrq-sz  avgqu-sz     await     svctm     %util
11:43:02 PM  dev202-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
11:43:02 PM dev202-16   1226.80      0.00   9814.43      8.00      1.42      1.16      0.77     94.64

11:43:02 PM       DEV       tps  rd_sec/s  wr_sec/s  avgrq-sz  avgqu-sz     await     svctm     %util
11:43:03 PM  dev202-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
11:43:03 PM dev202-16   1171.00      0.00   9368.00      8.00      1.32      1.13      0.79     92.40

11:43:03 PM       DEV       tps  rd_sec/s  wr_sec/s  avgrq-sz  avgqu-sz     await     svctm     %util
11:43:04 PM  dev202-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
11:43:04 PM dev202-16   1204.21      0.00   9633.68      8.00      1.32      1.10      0.80     96.63

11:43:04 PM       DEV       tps  rd_sec/s  wr_sec/s  avgrq-sz  avgqu-sz     await     svctm     %util
11:43:05 PM  dev202-0      8.16      0.00     65.31      8.00      0.03      4.25      0.87      0.71
11:43:05 PM dev202-16   1190.82      0.00   9526.53      8.00      1.52      1.28      0.81     96.02

this didn't last long, after the cq finished , the disk returned to normal

12:39:03 AM       DEV       tps  rd_sec/s  wr_sec/s  avgrq-sz  avgqu-sz     await     svctm     %util
12:39:04 AM  dev202-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
12:39:04 AM dev202-16      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00

12:39:04 AM       DEV       tps  rd_sec/s  wr_sec/s  avgrq-sz  avgqu-sz     await     svctm     %util
12:39:05 AM  dev202-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
12:39:05 AM dev202-16     45.00      0.00    440.00      9.78      0.30      6.69      0.24      1.10

12:39:05 AM       DEV       tps  rd_sec/s  wr_sec/s  avgrq-sz  avgqu-sz     await     svctm     %util
12:39:06 AM  dev202-0      8.00      0.00     64.00      8.00      0.03      4.12      0.88      0.70
12:39:06 AM dev202-16     18.00      0.00    144.00      8.00      0.06      3.50      0.28      0.50

12:39:06 AM       DEV       tps  rd_sec/s  wr_sec/s  avgrq-sz  avgqu-sz     await     svctm     %util
12:39:07 AM  dev202-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
12:39:07 AM dev202-16      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00

12:39:07 AM       DEV       tps  rd_sec/s  wr_sec/s  avgrq-sz  avgqu-sz     await     svctm     %util
12:39:08 AM  dev202-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
12:39:08 AM dev202-16      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00

12:39:08 AM       DEV       tps  rd_sec/s  wr_sec/s  avgrq-sz  avgqu-sz     await     svctm     %util
12:39:09 AM  dev202-0      2.00      0.00     16.00      8.00      0.00      1.50      1.00      0.20
12:39:09 AM dev202-16      8.00      0.00     64.00      8.00      0.04      4.50      3.25      2.60

several rounds later, the db returned 500 to client's inserts.

after the last DEAD, I changed the write-timeout = "10s" to 30s and restarted the DB,I didn't believe this could help but would give it a try and it doesn't dead till now.

influxd.txt

just2d avatar Jan 07 '16 16:01 just2d

This behaviour will not be addressed. Instead you should switch to the tsm1 engine, which will soon become the only engine that is supported. tsm1 is officially experimental, but will be production-ready soon.

otoolep avatar Jan 07 '16 17:01 otoolep

As previously mentioned, the bz1 engine has been deprecated with the 0.10.0 release which uses tsm as the default storage engine. Please try upgrading to 0.10.0 and create a new issue if you run into any problems.

rossmcdonald avatar Feb 08 '16 23:02 rossmcdonald