tail: cannot watch `error_log’: No space left on device

tail: cannot watch `error_log’: No space left on device

I saw the above error message when I tried to tail the error logs and access logs on my cPanel server. Do the below steps if you are facing the same issue.

1. First you must check the disk usage using “df -h” command

log into server via SSH as ‘root’ and type the command ‘df -h’ to check the current disk used on the linux server.

Command :

df -h


df –human-readable

-h or –human-readable option will show the disk usage in human readable format (shows size in Kb, Mb, Gb)

An example is given below

root@server:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda 57G 54G 0 100% /

The disk usage reached 100% on the above linux server and that is the reason why you’re facing this issue. You must delete some unwanted files on the server to resolve this issue.

Follow the below steps if there is enough disk space on your server.

2. Check inode usage using the command ‘df -i’

Log into linux server via SSH as ‘root’ user and type the command ‘df -i’

Example :

root@server:~# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/dm-0 3760128 3760128 0 100% /

The above server reached 100% inode usage so you must delete some files to free inode usage. Follow the below steps if disk and inode usage is not reached.

3. Check the current Inotify Watches Limit value in the file “/proc/sys/fs/inotify/max_user_watches” using cat command

cat /proc/sys/fs/inotify/max_user_watches

Current value is 9192 and you must increase it to fix the error.

run the below command to increase the value

echo “17000” > /proc/sys/fs/inotify/max_user_watches

You can also change the Inotify Watches Limit by editing the sysctl.conf file

vi /etc/sysctl.conf

Enter “fs.inotify.max_user_watches=17000”

Save the file and exit

Now try to tail the error_log and you wont see any disk space errors.