tail: inotify cannot be used, reverting to polling: Too many open files

tail -f catalina.out 出現警告:tomcat

 tail: inotify cannot be used, reverting to polling: Too many open filescode

lsof | awk '{ print $2; }' | sort -rn | uniq -c | sort -rn | head

查到是tomcat進程打開了不少文件,處理方法:進程

在 /etc/sysctl.conf文件中加入下面的配置:awk

fs.inotify.max_user_watches=1048576
fs.inotify.max_user_instances=1048576sed

 

sysctl -p /etc/sysctl.conf 使修改生效。再次執行 tail -f catalina.out 就能夠了。配置

相關文章
相關標籤/搜索