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 就能够了。配置

相关文章
相关标签/搜索