If your Elasticsearch data node service is refusing to start with this error:

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

You’ve to increase the mmap count limit by running this command:

sysctl -w vm.max_map_count=262144

This temporarily increases the limit, but to persist this change permanently, you have to add the following line to the /etc/sysctl.conf file:

vm.max_map_count = 262144

If you are running Elasticsearch via Docker, you have to restart your Docker container after making this change to the host machine.