-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Done
-
Affects Version/s: 1.3.1107
-
Fix Version/s: 1.3.1107
-
Component/s: Local watcher, Tests, Watchdog
Running the test suite under Linux with nosetests -v -x 2>&1 | tee /tmp/logs we get:
====================================================================== ERROR: test_synchronization_loop (nxdrive.tests.test_integration_synchronization.TestIntegrationSynchronization) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ataillefer/sources/nuxeo/addons/nuxeo-drive/nuxeo-drive-client/nxdrive/tests/test_integration_synchronization.py", line 418, in test_synchronization_loop syn.loop(delay=0, max_loops=3) File "/home/ataillefer/sources/nuxeo/addons/nuxeo-drive/nuxeo-drive-client/nxdrive/synchronizer.py", line 1466, in loop max_sync_step=max_sync_step) File "/home/ataillefer/sources/nuxeo/addons/nuxeo-drive/nuxeo-drive-client/nxdrive/synchronizer.py", line 1708, in update_synchronize_server self.setup_local_watchdog(server_binding) File "/home/ataillefer/sources/nuxeo/addons/nuxeo-drive/nuxeo-drive-client/nxdrive/synchronizer.py", line 1968, in setup_local_watchdog recursive=True) File "/usr/local/lib/python2.7/dist-packages/watchdog/observers/api.py", line 324, in schedule timeout=self.timeout) File "/usr/local/lib/python2.7/dist-packages/watchdog/observers/inotify.py", line 118, in __init__ watch.is_recursive) File "/usr/local/lib/python2.7/dist-packages/watchdog/observers/inotify_buffer.py", line 61, in __init__ self._inotify = Inotify(path, recursive) File "/usr/local/lib/python2.7/dist-packages/watchdog/observers/inotify_c.py", line 165, in __init__ Inotify._raise_error() File "/usr/local/lib/python2.7/dist-packages/watchdog/observers/inotify_c.py", line 391, in _raise_error raise OSError("inotify instance limit reached") OSError: inotify instance limit reached
A first workaround is to increase /proc/sys/fs/inotify/max_user_instances as a prerequisite to Drive installation under Linux:
# increase inotify file watch limit
ofile=/proc/sys/fs/inotify/max_user_instances
sudo sh -c "echo 8192 > $ofile"
cat $ofile
Another workaround is to catch the exception and fall back to local scan.
I guess the true solution would be to understand why the inotify user instances are not closed and handle it.
- depends on
-
NXDRIVE-46 Use FS notifications to incrementally detect files to synchronize in Nuxeo Drive
- Resolved
- is required by
-
NXDRIVE-112 Test and fix local change detection with Watchdog
- Resolved