I am not really sure which value to use for the inotify limit – on the server I have 7.685.636 files, and 2.142.642 folders shared in total – with two shared folders, and the warning to raise the limit is from the bigger one with locally 5.980.180 files and 1.309.771 folders. I set the inotify limit generally in the sysctl.conf to 3072000 and directly to /proc/sys/fs/inotify/max_user_watches with the same value. No restart or whatever so far. How high must be the value in this case with about 2.200.000 folders and 8.000.000 files? Maybe I missed something, output of sysctl fs.notify is:
Higher than the amount of directories, i.e. > 2’200’000, should be good. You might also have some open from other programs, so add some margin to that, but I’d expect 3’072’000 to be enough with your numbers. I don’t know what could cause the warning to persist, but restarting syncthing and/or the system might help.
After the scan right now I’ll stop / start Syncthing and have a look. The system itself as second option later today or on the weekend if it doesn’t work with the Syncthing service.