Help with inotify

I’m trying to get inotify working on OS X. I’m confused about two things.

  1. API key. Does this need to be entered only once? I suspect so, because if I try to launch inotify a 2nd time with it included I get a “syncwatcher.go:381: Cannot connect to Syncthing, Status 403 != 404 for POST”

  2. I’m getting a warning about one of my shares having too many open files. I think that it might have to do with the OS X Troubleshooting note at the bottom of the page. Even if not, doing the Temporary Fix for that issue seems like a good idea. However, as suggested: sudo sh -c ‘echo 262144 > /proc/sys/fs/inotify/max_user_watches’ yields a directory not found - which is true, it does not exist. Do I create it? (I think it can’t hurt) or is this now elsewhere and the Troubleshooting hint is out of date?

Thanks in advance for any tips.

  1. I think the latest version reads that straight from syncthings config file.
  2. Suggest you follow: http://superuser.com/questions/433746/is-there-a-fix-for-the-too-many-open-files-in-system-error-on-os-x-10-7-1

Thanks, updated OSX instructions.

Thanks for the tips. I really had to crank up the max proc to get it to stop the error.

I really wish I understood inotify a little more. Is there a direct link between the total number of files SyncThing is watching in the shares to the number of items inotify wants to have open for monitoring?

As for increasing those limits on OS X, you can do it as the link you provided suggests. I think a little more elegant way is to do it via launchd as described here: http://superuser.com/questions/830149/os-x-yosemite-too-many-files-open that way copying those changes to other clients is a little simper and you can use launchd to enable/disable at will for any troubleshooting.