InfluxDB process dies after executing a query
Environment information
- InfluxDB 0.9.5.1
- Server: Amazon instance c3.xlarge
- Volumes for data and metadata with 3000 IOPS
- Writes: Around 6000 writes per minute
Issue description
I am using influxDB with Grafana. When I execute a complicate query, for instance to collect data of the last day, the influxDB process dies without any log trace at the log.
For instance I executed the following query (using Grafana):
[query] 2015/12/05 22:43:28 SELECT mean(value) AS "value" FROM "operations"."default".monitor WHERE "key" = 'Estimated_Progation_Delay' AND time > 1449340986s AND time < 1449355386s GROUP BY time(5s)
I didn't receive any answer and after some minutes the process died.
This is the end of the log:
[root@ip-172-30-4-112 20151205_issue]# tail -10 influxd.log-20151206
[http] 2015/12/05 22:43:39 127.0.0.1 - operations_writer [05/Dec/2015:22:43:39 +0000] POST /write?db=customers&p=%5BREDACTED%5D&u=operations_writer HTTP/1.1 204 0 - Java/1.8.0_65 a0dbc1f3-9ba1-11e5-a298-000000000000 3.35313ms
[http] 2015/12/05 22:43:39 127.0.0.1 - operations_writer [05/Dec/2015:22:43:39 +0000] POST /write?db=customers&p=%5BREDACTED%5D&u=operations_writer HTTP/1.1 204 0 - Java/1.8.0_65 a0e4129f-9ba1-11e5-a299-000000000000 4.322569ms
[http] 2015/12/05 22:43:39 127.0.0.1 - operations_writer [05/Dec/2015:22:43:39 +0000] POST /write?db=customers&p=%5BREDACTED%5D&u=operations_writer HTTP/1.1 204 0 - Java/1.8.0_65 a0ec88d3-9ba1-11e5-a29a-000000000000 2.932135ms
[http] 2015/12/05 22:43:39 127.0.0.1 - operations_writer [05/Dec/2015:22:43:39 +0000] POST /write?db=customers&p=%5BREDACTED%5D&u=operations_writer HTTP/1.1 204 0 - Java/1.8.0_65 a0f4cc76-9ba1-11e5-a29b-000000000000 3.179098ms
[http] 2015/12/05 22:43:39 127.0.0.1 - operations_writer [05/Dec/2015:22:43:39 +0000] POST /write?db=customers&p=%5BREDACTED%5D&u=operations_writer HTTP/1.1 204 0 - Java/1.8.0_65 a0fd176f-9ba1-11e5-a29c-000000000000 4.922814ms
[http] 2015/12/05 22:43:39 127.0.0.1 - operations_writer [05/Dec/2015:22:43:39 +0000] POST /write?db=customers&p=%5BREDACTED%5D&u=operations_writer HTTP/1.1 204 0 - Java/1.8.0_65 a1059fb7-9ba1-11e5-a29d-000000000000 3.60048ms
[wal] 2015/12/05 22:43:42 Flush due to idle. Flushing 38 series with 38 points and 1708 bytes from partition 1
[http] 2015/12/05 22:43:42 127.0.0.1 - operations_writer [05/Dec/2015:22:43:42 +0000] POST /write?db=operations&p=%5BREDACTED%5D&u=operations_writer HTTP/1.1 204 0 - Java/1.8.0_65 a280d5ff-9ba1-11e5-a29e-000000000000 52.991658ms
[wal] 2015/12/05 22:43:42 write to index of partition 1 took 106.997178ms
[http] 2015/12/05 22:43:42 127.0.0.1 - operations_writer [05/Dec/2015:22:43:42 +0000] POST /write?db=operations&p=%5BREDACTED%5D&u=operations_writer HTTP/1.1 204 0 - Java/1.8.0_65 a2d42d9c-9ba1-11e5-a29f-000000000000 19.62592ms
Just some POST log traces, but no error.
If I remove that lines from the log (using "grep -v"), I just find some query results and the query the causes the process to die:
[root@ip-172-30-4-112 20151205_issue]# tail -1000 influxd.log-20151206 | grep -v POST | tail
[http] 2015/12/05 22:43:27 127.0.0.1 - operations_reader [05/Dec/2015:22:43:03 +0000] GET /query?db=operations&epoch=ms&q=SELECT+MEAN%28%22value%22%29+AS+%22value%22++FROM+%22monitor%22+WHERE+%22key%22+%3D+%27USER-%3Eget_idle_cpu.sh%27+AND+time+%3E+1449348184s+and+time+%3C+1449355384s+AND+%22value%22+%3C+30+GROUP+BY+time%281s%29%2C+%22location%22 HTTP/1.1 200 93578 http://52.70.63.89:3000/dashboard/db/locations Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/601.2.7 (KHTML, like Gecko) Version/9.0.1 Safari/601.2.7 8b9367b2-9ba1-11e5-a15c-000000000000 24.104709998s
[query] 2015/12/05 22:43:28 SELECT mean(value) AS "value" FROM "operations"."default".monitor WHERE "key" = 'Estimated_Progation_Delay' AND time > 1449340986s AND time < 1449355386s GROUP BY time(5s)
[http] 2015/12/05 22:43:28 127.0.0.1 - operations_reader [05/Dec/2015:22:43:19 +0000] GET /query?db=operations&epoch=ms&q=SELECT+MEAN%28%22value%22%29+AS+%22value%22++FROM+%22monitor%22+WHERE+%22key%22+%3D+%27USER-%3Eget_idle_cpu.sh%27+AND+time+%3E+1449340986s+and+time+%3C+1449355386s+AND+%22value%22+%3C+30+GROUP+BY+time%285s%29%2C+%22location%22 HTTP/1.1 200 51485 http://52.70.63.89:3000/dashboard/db/locations Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/601.2.7 (KHTML, like Gecko) Version/9.0.1 Safari/601.2.7 950f2480-9ba1-11e5-a1bc-000000000000 9.007795569s
[wal] 2015/12/05 22:43:30 Flush due to idle. Flushing 38 series with 38 points and 1708 bytes from partition 1
[wal] 2015/12/05 22:43:30 write to index of partition 1 took 13.450334ms
[http] 2015/12/05 22:43:34 127.0.0.1 - operations_reader [05/Dec/2015:22:43:19 +0000] GET /query?db=operations&epoch=ms&q=SELECT+MEAN%28%22value%22%29+AS+%22value%22++FROM+%22monitor%22+WHERE+%22key%22+%3D+%27CPU_USAGE-%3ELOAD_1_MIN%27+AND+time+%3E+1449340986s+and+time+%3C+1449355386s+AND+%22value%22+%3E+3000+GROUP+BY+time%2810s%29%2C+%22location%22 HTTP/1.1 200 5849 http://52.70.63.89:3000/dashboard/db/locations Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/601.2.7 (KHTML, like Gecko) Version/9.0.1 Safari/601.2.7 9532a8a2-9ba1-11e5-a1c0-000000000000 14.308940413s
[http] 2015/12/05 22:43:34 127.0.0.1 - operations_reader [05/Dec/2015:22:43:03 +0000] GET /query?db=operations&epoch=ms&q=SELECT+mean%28%22value%22%29+AS+%22value%22+FROM+%22monitor%22+WHERE+%22key%22+%3D+%27USER-%3Equick_skip.sh%27+AND+%22value%22+%3E+0+AND++%22location%22++%21~+%2F.%2AQA.%2A%2F+AND+time+%3E+1449348184s+and+time+%3C+1449355384s+GROUP+BY+time%281s%29%2C+%22location%22 HTTP/1.1 200 149786 http://52.70.63.89:3000/dashboard/db/locations Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/601.2.7 (KHTML, like Gecko) Version/9.0.1 Safari/601.2.7 8b9479fa-9ba1-11e5-a15d-000000000000 30.496360497s
[http] 2015/12/05 22:43:34 127.0.0.1 - operations_reader [05/Dec/2015:22:43:20 +0000] GET /query?db=operations&epoch=ms&q=SELECT+MEAN%28%22value%22%29+AS+%22value%22++FROM+%22monitor%22+WHERE+%22key%22+%3D+%27CPU_USAGE-%3ELOAD_1_MIN%27+AND+time+%3E+1449340986s+and+time+%3C+1449355386s++GROUP+BY+time%2810s%29 HTTP/1.1 200 7060 http://52.70.63.89:3000/dashboard/db/locations Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/601.2.7 (KHTML, like Gecko) Version/9.0.1 Safari/601.2.7 959ade14-9ba1-11e5-a1c2-000000000000 13.848341534s
[wal] 2015/12/05 22:43:42 Flush due to idle. Flushing 38 series with 38 points and 1708 bytes from partition 1
[wal] 2015/12/05 22:43:42 write to index of partition 1 took 106.997178ms
In summary, I am mainly blocked because the process dies without any explanation... There is no log trace that explains what is happening.
I have reproduced the issue multiple times, when I execute a query to obtain data of more than one hour (for instance one day), it dies.
Please, could you give me any advice to troubleshoot this issue?
Thank you in advance!!
Ok. I close the issue. The process is killed by the OS:
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.377465] influxd invoked oom-killer: gfp_mask=0x280da, order=0, oom_score_adj=0
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.381471] influxd cpuset=/ mems_allowed=0
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.383319] CPU: 1 PID: 2983 Comm: influxd Tainted: G E 4.1.10-17.31.amzn1.x86_64 #1
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.386672] Hardware name: Xen HVM domU, BIOS 4.2.amazon 05/06/2015
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.389243] 0000000000000000 ffff8801e5cd3a48 ffffffff814da9c0 0000000000003008
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.392601] ffff8801e67bb300 ffff8801e5cd3af8 ffffffff814d8177 ffff8801e5cd3aa8
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.395904] ffffffff811bf9c7 ffff8801efc39c00 ffff8801e7813990 0000000000000080
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.399263] Call Trace:
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.400307] [<ffffffff814da9c0>] dump_stack+0x45/0x57
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.402422] [<ffffffff814d8177>] dump_header+0x7f/0x1fe
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.404588] [<ffffffff811bf9c7>] ? mem_cgroup_iter+0x137/0x3d0
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.406904] [<ffffffff8107f506>] ? __queue_work+0x136/0x320
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.409363] [<ffffffff8115d21c>] oom_kill_process+0x1cc/0x3b0
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.411882] [<ffffffff8115d77e>] __out_of_memory+0x31e/0x530
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.414309] [<ffffffff8115db2b>] out_of_memory+0x5b/0x80
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.416671] [<ffffffff81162b89>] __alloc_pages_nodemask+0x8a9/0x8d0
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.419332] [<ffffffff811a7a05>] alloc_pages_vma+0xb5/0x200
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.421800] [<ffffffff81188105>] handle_mm_fault+0x1355/0x1770
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.424209] [<ffffffff8109b7dc>] ? set_next_entity+0xac/0x4e0
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.426612] [<ffffffff8118e595>] ? do_mmap_pgoff+0x2f5/0x3c0
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.429147] [<ffffffff81012663>] ? __switch_to+0x1e3/0x580
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.431432] [<ffffffff8105dafc>] __do_page_fault+0x17c/0x420
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.433756] [<ffffffff8105ddc2>] do_page_fault+0x22/0x30
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.436334] [<ffffffff814e3418>] page_fault+0x28/0x30
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.438444] Mem-Info:
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.439433] active_anon:1882895 inactive_anon:13 isolated_anon:0
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.439433] active_file:39 inactive_file:0 isolated_file:0
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.439433] unevictable:0 dirty:23 writeback:0 unstable:0
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.439433] slab_reclaimable:5653 slab_unreclaimable:3340
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.439433] mapped:62 shmem:19 pagetables:6428 bounce:0
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.439433] free:10385 free_pcp:178 free_cma:0
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.453103] Node 0 DMA free:15868kB min:20kB low:24kB high:28kB active_anon:0kB inactive_anon:0kB active_file:0
kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15988kB managed:15904kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB s
hmem:0kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB writeb
ack_tmp:0kB pages_scanned:0 all_unreclaimable? yes
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.483953] lowmem_reserve[]: 0 3746 7463 7463
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.487034] Node 0 DMA32 free:20288kB min:5504kB low:6880kB high:8256kB active_anon:3782112kB inactive_anon:28k
B active_file:304kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:3915776kB managed:3840292kB mlocked:0kB dirty:28kB writ
eback:0kB mapped:44kB shmem:36kB slab_reclaimable:12964kB slab_unreclaimable:5388kB kernel_stack:832kB pagetables:12648kB unstable:0kB bounce:0kB free_pcp:
300kB local_pcp:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:3916 all_unreclaimable? yes
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.506466] lowmem_reserve[]: 0 0 3717 3717
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.508357] Node 0 Normal free:5384kB min:5464kB low:6828kB high:8196kB active_anon:3749468kB inactive_anon:24k
B active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:3932160kB managed:3806460kB mlocked:0kB dirty:64kB writeb
ack:0kB mapped:0kB shmem:40kB slab_reclaimable:9648kB slab_unreclaimable:7972kB kernel_stack:1536kB pagetables:13064kB unstable:0kB bounce:0kB free_pcp:464
kB local_pcp:84kB free_cma:0kB writeback_tmp:0kB pages_scanned:3332 all_unreclaimable? yes
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.528482] lowmem_reserve[]: 0 0 0 0
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.530505] Node 0 DMA: 1*4kB (U) 1*8kB (U) 1*16kB (U) 1*32kB (U) 1*64kB (U) 1*128kB (U) 1*256kB (U) 0*512kB 1*
1024kB (U) 1*2048kB (R) 3*4096kB (M) = 15868kB
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.537144] Node 0 DMA32: 86*4kB (UEM) 61*8kB (UEM) 122*16kB (UEM) 93*32kB (UEM) 55*64kB (UEM) 25*128kB (UEM) 8
*256kB (UE) 0*512kB 0*1024kB 1*2048kB (R) 1*4096kB (R) = 20672kB
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.544038] Node 0 Normal: 271*4kB (UE) 0*8kB 1*16kB (R) 1*32kB (R) 1*64kB (R) 1*128kB (R) 1*256kB (R) 1*512kB
(R) 1*1024kB (R) 1*2048kB (R) 0*4096kB = 5164kB
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.550518] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.554062] 89 total pagecache pages
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.555436] 0 pages in swap cache
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.556801] Swap cache stats: add 0, delete 0, find 0/0
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.558949] Free swap = 0kB
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.560134] Total swap = 0kB
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.561889] 1965981 pages RAM
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.563107] 0 pages HighMem/MovableOnly
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.564743] 50317 pages reserved
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.566023] [ pid ] uid tgid total_vm rss nr_ptes nr_pmds swapents oom_score_adj name
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.569623] [ 1627] 0 1627 2812 189 12 3 0 -1000 udevd
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.573098] [ 1752] 0 1752 2810 193 11 3 0 -1000 udevd
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.576584] [ 1753] 0 1753 2810 190 11 3 0 -1000 udevd
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.580160] [ 2149] 0 2149 2334 126 9 3 0 0 dhclient
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.583681] [ 2190] 0 2190 28010 99 24 3 0 -1000 auditd
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.587143] [ 2208] 0 2208 61860 186 22 3 0 0 rsyslogd
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.590819] [ 2219] 0 2219 3429 61 11 3 0 0 irqbalance
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.594576] [ 2225] 0 2225 1096 22 8 3 0 0 rngd
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.598040] [ 2239] 32 2239 8815 98 22 3 0 0 rpcbind
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.601601] [ 2256] 29 2256 9957 201 24 4 0 0 rpc.statd
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.605344] [ 2279] 81 2279 5442 60 15 3 0 0 dbus-daemon
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.609184] [ 2397] 0 2397 19446 205 40 3 0 -1000 sshd
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.612663] [ 2448] 38 2448 7315 141 18 3 0 0 ntpd
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.616377] [ 2460] 497 2460 160181 2477 43 5 0 0 grafana-server
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.620242] [ 2546] 0 2546 23229 264 47 3 0 0 master
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.627375] [ 2553] 0 2553 29873 146 17 4 0 0 crond
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.634812] [ 2555] 89 2555 23292 260 46 4 0 0 qmgr
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.640275] [ 2565] 0 2565 4261 39 13 3 0 0 atd
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.645096] [ 2589] 0 2589 1609 31 9 3 0 0 agetty
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.649558] [ 2591] 0 2591 1079 24 8 3 0 0 mingetty
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.654009] [ 2595] 0 2595 1079 25 8 3 0 0 mingetty
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.657817] [ 2597] 0 2597 1079 24 8 3 0 0 mingetty
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.661558] [ 2599] 0 2599 1079 24 8 3 0 0 mingetty
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.665337] [ 2601] 0 2601 1079 24 8 3 0 0 mingetty
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.669634] [ 2603] 0 2603 1079 24 8 3 0 0 mingetty
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.673968] [ 2976] 498 2976 6058766 1815919 5586 31 0 0 influxd
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.678268] [ 2986] 0 2986 1219202 61006 301 8 0 0 java
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.682103] [15502] 89 15502 23250 256 47 3 0 0 pickup
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.685898] Out of memory: Kill process 2976 (influxd) score 950 or sacrifice child
Dec 5 22:43:44 ip-172-30-4-112 kernel: [177817.689317] Killed process 2976 (influxd) total-vm:24235064kB, anon-rss:7263676kB, file-rss:0kB