From c3802e5bfd72b3e1121bf1a56caea100b648ee90 Mon Sep 17 00:00:00 2001 From: Zillode Date: Wed, 22 Apr 2015 09:08:01 +0200 Subject: [PATCH] Updated README with max_user_watches information --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b0ce2a3..63bca30 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,9 @@ go build ``` -#### Troubleshooting (OSX) -* The Go bindings for inotify do not support recursive watching on OSX. Therefore, when watching many files on OSX, we might not have enough inotify handles available and the app exits with the message:```no space left on device```. This is an [open issue](https://github.com/syncthing/syncthing-inotify/issues/8) and [common for other applications as well ](http://superuser.com/a/443168). Linux might also be affected by this issue when you have many subdirectories. +#### Troubleshooting for folders with many files on Linux +* Linux limits the amount of inotify watchers (typically to [8192](http://stackoverflow.com/a/20355253)). Therefore, if you wish to sync many files and folders, you'll need to increase the upper limit: - Temporary fix for OSX: ```sudo sh -c 'echo kern.maxfiles=20480\\nkern.maxfilesperproc=18000 >> /etc/sysctl.conf'``` - - Temporary fix for Linux: ```sudo sh -c 'echo fs.inotify.max_user_watches=20480\n >> /etc/sysctl.conf'``` + Permanently fix `Too many open files` for Linux: ```sudo sh -c 'echo fs.inotify.max_user_watches=204800\n >> /etc/sysctl.conf'``` + + Fix `Too many open files` for Linux until next reboot: ```sudo sh -c 'echo fs.inotify.max_user_watches=204800\n >> /etc/sysctl.conf'``` (should be applied before launching syncthing-inotify)