Setting inotify limit PERMANENTLY on Synology Diskstation

Hi there

Every time my Synology Diskstation restarts, Syncthing complains of Filesystem Watch Errors, referring me to this page -

I’ve followed both the permanent, and immediate commands on there, but whenever the device reboots, the filesystem watch error message is back.

Anyone else had this and can help?


1 Like

Hey, this seems like it is not a Syncthing error since it appears that the inotify handles are just not set permanently. This is not the right forum to fix this error. Try it at a Synology forum.

Good Luck

For configuring anything to always happen automatically, particularly to survive a DSM upgrade, always use the Task Scheduler. Any other method will eventually be over-written.

I have it run a script that, amongst other things, runs on boot sysctl -p /volume1/<path>/sysctl.conf where sysctl.conf contains fs.inotify.max_user_watches = 204800


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.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.