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