Agent run out of system notify watchers
Error code
SE_FS_TOO_MANY_SUBSCRIPTIONS
Agents use system file watchers to be notified of files updates. The error message appears in Synchronization Jobs and is frequent for a Linux OS, especially if there are lot of files and subdirectories in the synced folder. If the agent process hits the system's limit of watchers, the Agent won't be notified about file update and thus the only way for it to learn about these is by rescanning the folder, either manually or periodically. It's better to increase the watchers limit.
By default, system allocates 8192 watchers. Run the command to check that and see the output
cat /proc/sys/fs/inotify/max_user_watches
There are two ways to increase it. In either case, XXXXX is the number of watchers you'd like to set. Do not set amount of watchers more than 2147483647. Also note that majority Linux distributions can only support up to 524288 watchers even if you configure more.
Increase the number of watchers temporarily
Note
The increased number of notify watchers is preserved only until the computer is rebooted.
To temporarily increase the number of notify watchers:
-
In the Terminal run:
sudo sysctl fs.inotify.max_user_watches=XXXXX -
Ensure that the number has increased:
cat /proc/sys/fs/inotify/max_user_watches -
Restart the Agent.
Increase the number of watchers permanently
Linux
To permanently increase the number of workers on Linux:
-
Run the two commands:
echo fs.inotify.max_user_watches=XXXXXX | sudo tee -a /etc/sysctl.conf sudo sysctl -p -
Recheck that the number has indeed increased:
cat /proc/sys/fs/inotify/max_user_watches -
Restart the Agent.
Synology NAS
To permanently increase the number of workers on a Synology NAS device:
- Log in to Synology DSM.
-
Open the Control Panel and click Task scheduler.
-
Select Create > Triggered Task > User-defined script.
-
In the General tab:
-
In the Task Settings tab, in the Run command section, enter the following line:
sysctl fs.inotify.max_user_watches=524288 -
Reboot your NAS device.
QNAP NAS
To permanently increase the number of workers on a Qnap NAS device:
- Establish SSH connection to your NAS device.
- Follow instructions in the Running Your Own Application at Startup guide to mount the configuration volume.
-
Add the script increasing watchers to the
/tmp/config/autorun.shfile:echo -en "echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf\nsudo sysctl -p\n" > /tmp/config/autorun.sh -
Apply execute permission and run the
autorun.sh:chmod +x /tmp/config/autorun.sh && /tmp/config/autorun.sh -
Unmount the config volume:
umount /tmp/config -
Open QNAP WebUI, navigate to Control Panel -> Hardware -> General, then select the Run user defined processes during startup option and click Apply.




