How to solve “max virtual memory error” in Elasticsearch
1. problem
after starting Elasticsearch, an error has occured.
error : max virtual memory areas vm.max_map_count [4096] is too low,
increse to at least [65530]
2. solution
add into limits.conf
$ sudo vim /etc/security/limits.conf 'USER_NAME' hard nofile 262144 'USER_NAME' soft nofile 262144 'USER_NAME' hard nproc 262144 'USER_NAME' soft nproc 262144 'USER_NAME' hard memlock unlimited 'USER_NAME' soft memlock unlimited
add into sysctl.conf
$ sudo vim /etc/sysctl.conf vm.max_map_count=262144
after rebooting, done!!