Open chalvern opened 6 years ago
@chalvern hi, did you manage to solve it? As there are no log's it's hard to find out what caused the issue.
@pavolloffay I am afraid not, but possibly be source limit, as my k8s cluster is setted on 2 vm machines, each with 2cpu/2Gmemory. I will check it after in my free time.
As what I said, out of memory...
May 3 21:27:03 xxx-1 kernel: [74354.386802] Out of memory: Kill process 35184 (java) score 1621 or sacrifice child
May 3 21:27:03 xxx-1 kernel: [74354.387300] Killed process 35184 (java) total-vm:2599788kB, anon-rss:1262648kB, file-rss:0kB
Then it's environment issue, I will close it. If anything pops up up feel free to reopen.
Finally, my solution is to add the following ENV config to elasticsearch.yml
env:
- name: ES_JAVA_OPTS
value: -Xms256m -Xmx512m
- name: bootstrap.memory_lock
value: "true"
I'm reopening this, so that we apply @chalvern's env vars to elasticsearch.yml
.
@chalvern would you be interested in contributing a fix to this?
-Xms256m -Xmx512m
seems very low for Elasticsearch. For example openshift logging uses 8gb by default
I am also making a pointer do docs for bootstrap.memory_lock
https://www.elastic.co/guide/en/elasticsearch/reference/master/setup-configuration-memory.html#bootstrap-memory_lock
@jpkrohling I worry the -Xms256m -Xmx512m
is too low to use in production, just as @pavolloffay mentioned. The yaml of Elasticsearch in production seems actually like in test instead of in production.
What I suggest is to take it as test. In production, there should be replica of Elasticsearch or called cluster.
elasticsearch version:
docker.elastic.co/elasticsearch/elasticsearch:5.6.0
k8s cluster version
1.10
describe
log