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即可 

posted @ 2019-02-26 12:57  也曾少年  阅读(4618)  评论(0编辑  收藏  举报