docker-compose-elasticsearch-kibana icon indicating copy to clipboard operation
docker-compose-elasticsearch-kibana copied to clipboard

max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

Open chris-aeviator opened this issue 6 years ago • 5 comments

As with all elastic search docker images I've been working with (on Arch Linux & Ubuntu) there needs to be a one time command issued to set the vm.max_map_count more hight. Running docker-compose up -d therefore should include a way to set these automatically or via a script run after first spinup of the cluster.

❯ docker -v
Docker version 18.09.3-ce, build 774a1f4eee

❯ docker-compose -v
docker-compose version 1.23.2, build unknown

chris-aeviator avatar Apr 19 '19 09:04 chris-aeviator

@chris-aeviator This is setting recommended by Elastic.co which is outside Docker Compose and very well document here: https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docker.html

maxyermayank avatar May 21 '19 21:05 maxyermayank

I understand that, what I was trying to express was that without the setting docker-compose up will result in an error

chris-aeviator avatar May 22 '19 17:05 chris-aeviator

To whom it may help. Adding this manually or putting it in an Entrypoint:

sysctl -w vm.max_map_count=262144

medy36 avatar Nov 28 '19 16:11 medy36

For CENTOS 8 hosts I do the following before launching docker-compose:

Edit the /etc/sysctl.conf file by adding the following line (using vi or nano):

net.ipv4.ip_forward=1 vm.max_map_count=262144

Restart the network service:

systemctl restart NetworkManager.service

Validate the setting:

sysctl net.ipv4.ip_forward

You should get back the following response

net.ipv4.ip_forward = 1

grep vm.max_map_count /etc/sysctl.conf you should get back: vm.max_map_count=262144

This solved a problem with the second and third ES nodes not wanting to come up.

smcllc avatar Apr 10 '20 12:04 smcllc

For windows user.

https://stackoverflow.com/questions/42111566/elasticsearch-in-windows-docker-image-vm-max-map-count/66985432#66985432

jayagami avatar Apr 07 '21 11:04 jayagami