tail: cannot watch `/var/log/messages': No space left on device

Article: 100039721
Last Published: 2017-09-19
Ratings: 0 0
Product(s): Appliances

Problem

tail: cannot watch `/var/log/messages': No space left on device

Error Message

'No space left on device' message while there is abundant disk space available

Cause

The message is due to a shortage of system watches as opposed to any issue with disk space

Solution

1. Check the value in the following file:
cat /proc/sys/fs/inotify/max_user_watches
(Generally this will be 8192)
 
2. Temporary fix/test
sudo sysctl fs.inotify.max_user_watches= 65536
 
3. To make the setting permanent
add
fs.inotify.max_user_watches= 65536
to
/etc/sysctl.conf
 
4. Then reload the settings without rebooting using:
sysctl -p
 

Was this content helpful?