influxdb icon indicating copy to clipboard operation
influxdb copied to clipboard

out of memory with simple query

Open johnl opened this issue 10 years ago • 8 comments

influxdb 0.9.6.1 stable on 64bit ubuntu trusty, with data coming into collectd listener.

got about 1.4G of metrics in the db.

server has 2gb ram

run query:

SELECT value FROM "cpu_value" limit 5;

and process balloons to fill all ram in about 10 seconds, then crashes with an "fatal error: runtime: out of memory" error in the logs.

If I limit the query to a single or a group of hosts, it only balloons to around 50% ram and succeeds.

johnl avatar Dec 23 '15 12:12 johnl

Should be fixed when #5196 gets merged in. CC @benbjohnson

pauldix avatar Dec 23 '15 12:12 pauldix

Same happens no matter the order. I can order by asc or desc and still oom.

Probably worth noting, does this suggest that query ram usage is unbounded? Doesn't that make it always possible that someone issuing a bad query can crash the daemon, stopping new data from being collected?

johnl avatar Dec 23 '15 12:12 johnl

@johnl yes, query RAM usage is currently unbounded. It's on our TODO list to add memory limits per query for some release after 0.10.0.

pauldix avatar Dec 23 '15 13:12 pauldix

Just having the same issue with Influxdb 0.9.6. Just wondering, this issue will be fixed in 0.9.6 version? I'll upgrade to version 0.10 soon, but if not, this ticket should be closed.

pasancario avatar Apr 28 '16 14:04 pasancario

@pasancario This won't be fixed in 0.9.6. The current release is 0.12.2 which should not have this problem.

jwilder avatar Apr 28 '16 14:04 jwilder

@jwilder can you confirm that this is fixed?; we're running 0.13.0-1 and on a simple select * cpu_value query (collectd metrics) influxdb blows up w/ following error:

> select * from cpu_value
fatal error: runtime: out of memory

runtime stack:
runtime.throw(0x8439a0, 0x16)
    /usr/local/go/src/runtime/panic.go:547 +0x90
runtime.sysMap(0xc9c3a00000, 0x100000, 0x7f5d0a242c00, 0x9f56f8)
...

Ubuntu 14.04.3 LTS / AWS c4.xlarge

tehmaspc avatar May 25 '16 20:05 tehmaspc

@tehmaspc Can you log a new issue with more details? Please include the full stack trace, version you are using, number series, number of shards, etc..

jwilder avatar May 25 '16 21:05 jwilder

@jwilder - sure! https://github.com/influxdata/influxdb/issues/6728

tehmaspc avatar May 25 '16 21:05 tehmaspc