https://github.com/elastic/elasticsearch/issues/18462
To configure the heap size, you need to modify the jvm.options file. This is a new configuration file. There are two lines: -Xms and -Xmx to set the min and max heap size. These values should be equal, and must be equal if you trip the bootstrap checks.
将 jvm.options 中的 -Xms
and -Xmx to
设置成相等
譬如docker-compose中的配置
elasticsearch1:
image: docker.elastic.co/elasticsearch/elasticsearch:6.2.3
restart: always
container_name: elasticsearch1
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms256m -Xmx256m -XX:+AssumeMP"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
mem_limit: 1g
cap_add:
- IPC_LOCK
volumes:
- esdata1:/usr/share/elasticsearch/data
ports:
- 9200:9200
networks:
- code-network