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

Posted digdeep

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了tail: inotify cannot be used, reverting to polling: Too many open files相关的知识,希望对你有一定的参考价值。

tail -f catalina.out 出现警告:

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

lsof | awk ‘ print $2; ‘ | sort -rn | uniq -c | sort -rn | head

查到是tomcat进程打开了很多文件,处理方法:

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

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

 

sysctl -p /etc/sysctl.conf 使修改生效。再次执行 tail -f catalina.out 就可以了。

以上是关于tail: inotify cannot be used, reverting to polling: Too many open files的主要内容,如果未能解决你的问题,请参考以下文章

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

解决tail命令提示“tail: inotify 资源耗尽,无法使用 inotify 机制,回归为 polling 机制”

jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.net.URLClassLoader

FPGA小白学习之路erro:buffers of the same direction cannot be placed in series

ngrest警告:Cannot find inotifywait. Starting your project without file watcher support.(inotify-tools)

ngrest警告:Cannot find inotifywait. Starting your project without file watcher support.(inotify-tools)