運行環境:centos7.5 linux 打開文件數 too many open files 解決方法fs.inotify.max_user_watches預設值太小,導致too many open files執行:sysctl -w fs.inotify.max_user_watches="999 ...
運行環境: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即可