fs.inotify.max_user_watches默认值过小,致使too many open files

运行环境:centos7.5linux

linux 打开文件数 too many open files 解决方法
fs.inotify.max_user_watches默认值过小,致使too many open files
执行:sysctl -w fs.inotify.max_user_watches="99999999"(后面值根据实际状况可自行调整)
查询是否生效:cat /proc/sys/fs/inotify/max_user_watchesvim

 

 

永久生效方法以下:(建议采用此方法)
vim /etc/sysctl.conf
fs.inotify.max_user_watches = 1280000(后面值根据实际状况可自行调整)centos

fs.inotify.max_user_instances = 512
添加并运行/sbin/sysctl -p便可 
centos7

相关文章
相关标签/搜索