While running apt commands or restarting the service, getting a Failed to allocate directory watch: Too many open files error.
You can see the current limits with sysctl fs.inotify. On debian , with the defaults, these are as follows:
fs.inotify.max_queued_events = 16384 |
To fix the problem, create a conf file /etc/sysctl.d/60-fs-inotify.conf with the following contents:
fs.inotify.max_queued_events = 32768 |
To reload the new settings, you need to run :
sudo sysctl --system |