When you're getting the message "Error: No space left on device" in response to starting or stopping services on Linux, you may have too few inotify watchers.

I was at the command line on my Proxmox server the other day and noticed the "Error: No space left on device" message printing out whenever I would start or stop a service. This baffled me, because whenever I ran the "df" command it clearly showed that I had plenty of space on my devices; I was only using 17% or so. It bothered me enough that I googled around a bit and found this answer from ServerFault. It turns out that the system had too few watchers for inotify. Definitely not an intuitive error message!

The solution was to add the following line to my /etc/sysctl.conf

fs.inotify.max_user_watches = 262144

and then run "sysctl -p"



Blog Archive