Setting inotify limit PERMANENTLY on Synology Diskstation

FYI here’s what works on a DS916+ running DSM 6.1.7: go to Control Panel > Task Scheduler. Create a New Task > Triggered Task > User-defined script.

In General Settings tab: give it a name (e.g. “Syncthing sysctl inotify fix”) and Event = Boot-up.

In the Task Settings tab: enter this in the Run Command box:

sh -c '(sleep 90 && echo 204800 > /proc/sys/fs/inotify/max_user_watches)&'

The sleep is to delay the setting to (hopefully) skip past any initialisation that Synology do at boot. Seems to work for me.

Click Ok to close the task dialog, then enable the task and hit the Save button.

5 Likes