fs.inotify.max_user_watches默认值太小,导致too many open files


运行环境:centos7.5

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_watches

 

 

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

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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM