Tag Archives: Failed to allocate directory watch: Too many open files

Linux system service command error: Failed to allocate directory watch: Too many open files

In the Linux system, an error is reported through the service or systemctl command

    Failed to allocate directory watch: Too many open files

The solution is as follows

vim /etc/sysctl.conf
	fs.inotify.max_user_instances=512
	fs.inotify.max_user_watches=262144

Add the above two lines
to execute

sysctl -p 

Syactl – a view all current system parameters