小编pal*_*mic的帖子

elasticsearch @ debian6 由 /etc/init.d max_file_descriptors 启动

我已经通过本教程安装了 elasticsearch@debian6 。我已经设置了我的系统最大打开文件指令,所以我有这些值:

# su
# cat /proc/sys/fs/file-max
70000

# ulimit -Hn
64000

# ulimit -Sn
32000
Run Code Online (Sandbox Code Playgroud)

当我通过以下方式检查 elasticsearch max_file_descriptors 时:

curl -XGET 'http://localhost:9200/_nodes?process=true&pretty=true'
Run Code Online (Sandbox Code Playgroud)

我会得到 1024

当我用 root 用户重新启动它时,它现在有“max_file_descriptors”:64000。

init.d 自动启动有什么问题?当我检查 htop 时,由 init.d 自动启动的具有 1024 个描述符的弹性也在 root 用户下运行。

我已经设置了 2 个 confs 打开的最大文件数:

cat /etc/sysctl.conf
...
fs.file-max = 70000

cat /etc/security/limits.conf
...
*   soft    nofile  32000
*   hard    nofile  64000

root    soft    nofile  32000
root    hard    nofile  64000
Run Code Online (Sandbox Code Playgroud)

debian init.d elasticsearch

2
推荐指数
1
解决办法
1268
查看次数

标签 统计

debian ×1

elasticsearch ×1

init.d ×1