About query performance

hi, we are using influxdb oss 1.8.10.
and we ran the influxdb container through docker in vm.
The problem I faced was when I wrote a select query like this :
" SELECT count() FROM “measurements name” ,
" SELECT count(
) FROM “measurements name” WHERE time > ~~~~ AND time < ~~~~ ,
then our influxdb container shutted and sometimes vm also make a trouble

is there is anyone else who use influxdb oss with docker? and face a similar problem?
i need solutions or suggestions

here is message at docker demon systemlog :
“Out of memory: Killed process 2355 (influxd) total-vm:27143784kB, anon-rss:15142468kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:47164kB oom_score_adj:0”

In my opinion lack of resources seems to be the cause
If you have any opinions, please reply.