-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to watch directory ... no space left on device #1581
Comments
This error ( |
737 containers, 'fs.inotify.max_user_watches' is set to 8192 |
737 containers is a lot. Take a look at this SO answer: http://unix.stackexchange.com/a/13757/68061 I'm curious what the result of the suggested command is:
|
|
Hey @tallclair, I just ran into the same as @liftedkilt reported in many of the machines we're running ( all very well packed for their sizes). By default they're all running with 8K watches set in Naturally one can fix that by raising that limit but I was wondering whether we could reduce that number by removing unnecessary watches that are placed in Do you think there's room for making this more light-weight? I'd be willing to give a shot implementing it. Thx! |
Usually it should be OK to watch a single common cgroup subsystem (e.g. cpu), but that would risk missing containers that don't use that subsystem. That is probably a rare case that could be addressed with a configuration option though. I'm not super familiar with this part of the code, so perhaps someone more familiar can chime in. @vishh ? |
maybe your inotify resources exhausted, increase max_user_watches works for me.
|
@wangzi19870227 thanks, works for me |
@timstclair Is there anyway I can get the listing of the actual culprit? I cannot tell if the kubelet process is taking up majority of the watches even though the error is from kubelet.
|
I think it's worth mentioning that the inotify limit is a property of the host system, not the Docker image itself. So if you get this error, increase the inotify limit in you host system, not inside the Docker image. |
In case it may help, I just wrote a few lines of shell script to count inotify watches used by each inotify instance. We have a kubelet installation using up almost all the https://github.com/yousong/gists/blob/master/shell/inotify_watchers.sh |
after execution of orders: sudo find /proc/*/fd -lname anon_inode:inotify |
|
@timstclair i meet the same problem with 468 containers, 'fs.inotify.max_user_watches' is set to 8192 |
When trying to start cadvisor as either a container or as the standalone binary, it fails with the error:
Failed to watch directory "/sys/fs/cgroup/memory/system.slice": inotify_add_watch /sys/fs/cgroup/memory/system.slice/run-docker-netns-c6d57b04b0f8.mount: no space left on device
There is over 1.5Tb of free space, so I know it obviously isn't a space problem on the host. Any thoughts?
The text was updated successfully, but these errors were encountered: