# Fatal error: runtime: out of memory while query data

**URL:** <https://community.influxdata.com/t/fatal-error-runtime-out-of-memory-while-query-data/14863>\
**Category:** Systems\
**Tags:** influxdb\
**Created:** [June 17, 2020, 5:51am UTC](https://community.influxdata.com/t/fatal-error-runtime-out-of-memory-while-query-data/14863 "2020-06-17T05:51:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yuyongliao](https://avatars.discourse-cdn.com/v4/letter/y/dbc845/32.png) [@yuyongliao](https://community.influxdata.com/u/yuyongliao)\
**Post date:** [June 17, 2020, 5:51am UTC](https://community.influxdata.com/t/fatal-error-runtime-out-of-memory-while-query-data/14863/1 "2020-06-17T05:51:24Z")

</div>

Would you please suggest whether any parameter I set incorrectly? The select query triggered by influx cli.

ts=2020-06-17T05:43:13.654506Z lvl=info msg=“Executing query” log\_id=0NS4hDl0000 service=query query=“SELECT \* FROM bardata.autogen.bardata WHERE time \>= ‘2009-01-04’ AND time \<= ‘2011-03-02’”  
fatal error: runtime: out of memory

runtime stack:  
runtime.throw(0x16670d8, 0x16)  
/usr/local/go/src/runtime/panic.go:774 +0x72  
runtime.sysMap(0xca5c000000, 0x4000000, 0x35a6c78)  
/usr/local/go/src/runtime/mem\_linux.go:169 +0xc5  
runtime.(\*mheap).sysAlloc(0x358dc80, 0x4000, 0x4000, 0x7efed77fdd80)  
/usr/local/go/src/runtime/malloc.go:701 +0x1cd  
runtime.(\*mheap).grow(0x358dc80, 0x2, 0xffffffff)  
/usr/local/go/src/runtime/mheap.go:1255 +0xa3  
runtime.(\*mheap).allocSpanLocked(0x358dc80, 0x2, 0x35a6c88, 0x7ef72cc64360)  
/usr/local/go/src/runtime/mheap.go:1170 +0x266  
runtime.(\*mheap).alloc\_m(0x358dc80, 0x2, 0x450075, 0x7ef72cc64360)  
/usr/local/go/src/runtime/mheap.go:1022 +0xc2  
runtime.(\*mheap).alloc.func1()  
/usr/local/go/src/runtime/mheap.go:1093 +0x4c  
runtime.systemstack(0xc000518780)  
/usr/local/go/src/runtime/asm\_amd64.s:370 +0x66  
runtime.mstart()  
/usr/local/go/src/runtime/proc.go:1146

Here is my config file, InfluxDB version: 1.8, AWS EC2, RAM: 64G

[meta]

dir = “/influxdb/data/meta”

[data]

dir = “/influxdb/data/db”

wal-dir = “/influxdb/wal”

series-id-set-cache-size = 100

[coordinator]

[retention]

[shard-precreation]

[monitor]

[http]

[logging]

[subscriber]

[[graphite]]

[[collectd]]

[[opentsdb]]

[[udp]]

enabled = true

bind-address = “:8089”

database = “bardata”

read-buffer = 10737418240

[continuous\_queries]

[tls]

[hinted-handoff]

dir = “/influxdb/data/hh”

---

<div class="post-metadata">

**Author:** ![Bedas](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/bedas/32/2214_2.png) [@Bedas](https://community.influxdata.com/u/Bedas)\
**Post date:** [June 19, 2020, 5:51pm UTC](https://community.influxdata.com/t/fatal-error-runtime-out-of-memory-while-query-data/14863/2 "2020-06-19T17:51:14Z")

</div>

It’s very simple. You don’t have enough of memory (RAM) to select point from over 2 years.  
`time >= ‘2009-01-04’ AND time <= ‘2011-03-02’”`

---

<div class="post-metadata">

**Author:** ![yuyongliao](https://avatars.discourse-cdn.com/v4/letter/y/dbc845/32.png) [@yuyongliao](https://community.influxdata.com/u/yuyongliao)\
**Post date:** [June 22, 2020, 1:51am UTC](https://community.influxdata.com/t/fatal-error-runtime-out-of-memory-while-query-data/14863/3 "2020-06-22T01:51:49Z")

</div>

Thanks Bedas! But there are still 50% free memory in server, would you please share where to tune the InfluxDB memory larger?
