Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syncing many files with unison #329

Open
mre opened this issue Nov 6, 2017 · 1 comment
Open

Syncing many files with unison #329

mre opened this issue Nov 6, 2017 · 1 comment

Comments

@mre
Copy link

mre commented Nov 6, 2017

File sync didn't work properly on bigger projects (>100.000 files).
Sometimes files were missing inside the guest or on the host.
After some investigation I noticed that the unison container was crashing from time to time.

Looking at the container logs, I found the following error message:

Fatal error: Filesystem watcher error: cannot add a watcher: system limit reached
The watcher can be disabled by setting preference 'watch' to false

I am using docker-machine + boot2docker.

The following commands fixed the issue:

1. Log into boot2docker

docker-machine ssh

2. Increase the number of filesystem watches that unison can start

Add the following line to the end of /var/lib/boot2docker/profile:

sudo sysctl fs.inotify.max_user_watches=524288

3. Restart docker machine

docker-machine restart

After that, syncing bigger projects started to work for me.
This is not a support ticket.
It's a limitation of boot2docker, but I still wanted to document the behaviour somewhere, in case anybody else is running into the same problem.

@michaelsauter
Copy link
Owner

Nice find. Thanks a lot for the report. I might add the issue to a "Troubleshooting" section, and a general indication how to solve it. I never tried Crane with docker-machine, I'm using it with Docker for Mac and a project with ~50k files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants