前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >The user limit for number of open files is too small.

The user limit for number of open files is too small.

作者头像
xuyaowen
发布2020-12-30 14:58:47
6380
发布2020-12-30 14:58:47
举报
文章被收录于专栏:XUYAOWEN的专栏

当安装alluxio时,出现允许打开的文件数目过小问题:

代码语言:javascript
复制
The user limit for number of open files is too small. The current value is 4096. For production use, it should be bigger than 16384

解决方法:

代码语言:javascript
复制
#查看当前系统允许打开文件数目
cat /proc/sys/fs/file-max
#查看用户可以打开的文件数目
# Check Hard Limit in Linux
ulimit -Hn
# Check Soft Limits in Linux
ulimit -Sn

#修改系统
sysctl -w fs.file-max=500000 # 临时生效;
vi /etc/sysctl.conf # 永久生效
cat /proc/sys/fs/file-max 验证
sysctl -p # 修改立即生效;

# 修改用户限制
ulimit -Hn 16386 #临时生效;退出后失效
vi /etc/security/limits.conf,添加:
* soft nofile 16386
* hard nofile 16386 
确保 /etc/pam.d/login 文件中有:(没有则进行添加)
session required pam_limits.so 
重新登录即可;使用ulimit 查看变化;

参考链接:

https://www.tecmint.com/increase-set-open-file-limits-in-linux/

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2020-04-30 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档