meta data for this page
  •  

add_watch: cannot watch

Exception: Unable to update the server configuration with local parameters: Traceback (most recent call last):
...
pyinotify.WatchManagerError: add_watch: cannot watch /home/user/yocto/build/conf WD=-1, Errno=No space left on device (ENOSPC)

Reason: System already has increased max_user_watches to 32k, but running remote VSCode which watch changes in huge Yocto directory consumes it.

Solution is to increase max_user_watches

echo fs.inotify.max_user_watches=65536 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

or even higher values.

How to monitor used watches:

find /proc/*/fd -lname anon_inode:inotify |
   cut -d/ -f3 |
   xargs -I '{}' -- ps --no-headers -o '%p %U %c' -p '{}' |
   uniq -c |
   sort -nr

from How to set and understand fs.notify.max_user_watches