es - 文件描述符线程数最大虚拟内存设置

140 阅读1分钟

世界上并没有完美的程序,但是我们并不因此而沮丧,因为写程序就是一个不断追求完美的过程。

ERROR: [3] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2]: max number of threads [3796] for user [es] is too low, increase to at least [4096]
[3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

查看:ulimit -a

[1][2]
ulimit -n
ulimit -u

vi /etc/security/limits.conf:
* soft nofile 65535
* hard nofile 65535
* soft nproc 4096
* hard nproc 4096

然后打开新的会话:
ulimit -n : 65535
ulimit -u : 4096

[3]
vi /etc/sysctl.conf:
vm.max_map_count=262144

sysctl -p