ulimit too many open files
1. 问题
(1)、max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
每个进程最大同时打开文件数太小,可通过下面2个命令查看当前数量
(2). max number of threads [3818] for user [es] is too low, increase to at least [4096]
最大线程个数太低。修改配置文件/etc/security/limits.conf(和问题1是一个文件),增加配置
解决方案
修改文件/etc/security/limits.conf ,增加以下内容:
* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072
针对普通用户,还需要修改:/etc/security/limits.d/20-nproc.conf
* soft nproc 131072
root soft nproc unlimited
2. 问题
(3).max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
解决方案
修改文件vi /etc/sysctl.conf,增加以下内容:
vm.swappiness=0
vm.max_map_count=262144
执行以下命令生效:
sysctl -p
本文来自博客园,作者:硅谷工具人,转载请注明原文链接:https://www.cnblogs.com/30go/p/16409305.html