Doris 启动 BE 报错:file descriptors limit is too small
测试环境启动 BE 失败,提示如下:
E1216 10:50:15.593854 9129 storage_engine.cpp:419] File descriptor number is less than 60000. Please use (ulimit -n) to set a value equal or greater than 60000
W1216 10:50:15.593933 9129 storage_engine.cpp:181] check fd number failed, error: Internal error: file descriptors limit is too small
W1216 10:50:15.593942 9129 storage_engine.cpp:103] open engine failed, error: Internal error: file descriptors limit is too small
F1216 10:50:15.594342 9129 doris_main.cpp:199] fail to open StorageEngine, res=file descriptors limit is too small
解决办法
修改 /etc/security/limits.conf, 执行命令:
echo "* soft nofile 204800" >> /etc/security/limits.conf
echo "* hard nofile 204800" >> /etc/security/limits.conf
echo "* soft nproc 204800" >> /etc/security/limits.conf
echo "* hard nproc 204800 " >> /etc/security/limits.conf
修改 /etc/sysctl.conf, 执行命令:
echo fs.file-max = 6553560 >> /etc/sysctl.conf
重启BE服务器,重启BE进程
注:此解决办法不适用在docker中启动的BE,docker 中启动的 BE 遇到此问题, 上面的方法不能解决,可参考: https://www.cnblogs.com/JenningsMao/p/9209689.html。