-1

How to update Sysctl settings with

fs.inotify.max_user_watches=1048576
spuggy
  • 101
  • 2
  • Advice to newcomers: If an answer solves your problem, please accept it by clicking the large check mark (✓) next to it and optionally also up-vote it (up-voting requires at least 15 reputation points). If you found other answers helpful, please up-vote them. Accepting and up-voting helps future readers. Please see [the relevant help-center article](https://stackoverflow.com/help/someone-answers) – Gilles Quénot Apr 30 '23 at 15:40

2 Answers2

1

Like this:

sysctl -p /etc/sysctl.conf
Gilles Quénot
  • 4,226
  • 1
  • 27
  • 28
0

You can check the current inotify user instance limit, with the following:

cat /proc/sys/fs/inotify/max_user_instances

Similarly, the current inotify user watch limit can be checked as follows:

cat /proc/sys/fs/inotify/max_user_watches

Update the limits You can update the limits temporarily, with the following commands (setting the values to 8192 and 524288 respectively in this example):

sudo sysctl fs.inotify.max_user_instances=8192
sudo sysctl fs.inotify.max_user_watches=524288
sudo sysctl -p

In order to make the changes permanent, i.e. to persist a reboot, you can set fs.inotify.max_user_instances=8192 and fs.inotify.max_user_watches=524288 in the file /etc/sysctl.conf.

After updating the limits, you can validate these on the host again, as above, with cat /proc/sys/fs/inotify/max_user_instances and cat /proc/sys/fs/inotify/max_user_watches.

spuggy
  • 101
  • 2