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

相關文章
相關標籤/搜索