Friday, June 07, 2019

inotify resources exhausted

OK, you ran  simple command on Linux: "tail"
and you get the error message:

tail: inotify resources exhausted
tail: inotify resources exhausted
tail: inotify resources exhausted
tail: inotify resources exhausted
tail: inotify resources exhausted
tail: inotify resources exhausted
tail: inotify resources exhausted
tail: inotify resources exhausted
tail: inotify cannot be used, reverting to polling ...

Then check the process :

] ps aux | grep tail
root      2922  0.0  0.0 108004   632 pts/28   S    06:10   0:00 tail -f my-2019-0405.log
root      3046  0.0  0.0 108004   636 pts/24   S    06:10   0:00 tail -f my--2019-0406.log
....
SO who is the trouble-maker? :)

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

An example output:

      3 31739
     15 30701
     15 30623
      3 30370
    159 29901
      3 28841
     45 28632

     38 28620

 Go and find out which process opens many files...

Check out this URL:

In case, you would like to increase max-user-watches:
Permanent solution (preserved across restarts
Add this line: fs.inotify.max_user_watches=1048576
to the /etc/sysctl.conf
then do run the command:
sysctl -p

0 Comments:

Post a Comment

<< Home