From d5a7ee187631d726df4edcaca4c737aa2f4594cf Mon Sep 17 00:00:00 2001 From: Jonathan Jogenfors Date: Thu, 29 Feb 2024 17:03:43 +0100 Subject: [PATCH] document watcher recovery --- docs/docs/features/libraries.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/docs/features/libraries.md b/docs/docs/features/libraries.md index 58dd707ea0..0a68a79e0b 100644 --- a/docs/docs/features/libraries.md +++ b/docs/docs/features/libraries.md @@ -90,6 +90,16 @@ This feature - currently hidden in the config file - is considered experimental If your photos are on a network drive, automatic file watching likely won't work. In that case, you will have to rely on a periodic library refresh to pull in your changes. +#### Troubleshooting + +If you encounter an `ENOSPC` error, you need to increase your file watcher limit. In sysctl, this key is called `fs.inotify.max_user_watched` and has a default value of 8192. Increase this number to a suitable value greater than the number of files you will be watching. Note that Immich has to watch all files in your import paths including any ignored files. + +``` +ERROR [LibraryService] Library watcher for library c69faf55-f96d-4aa0-b83b-2d80cbc27d98 encountered error: Error: ENOSPC: System limit for number of file watchers reached, watch '/media/photo.jpg' +``` + +In rare cases, the library watcher can hang, preventing Immich from starting up. In this case, disable the library watcher in the configuration file. If the watcher is enabled from within Immich, the app must be started without the microservices. Disable the microservices in the docker compose file, start Immich, disable the library watcher in the admin settings, close Immich, re-enable the microservices, and then Immich can be started normally. + ### Nightly job There is an automatic job that's run once a day and refreshes all modified files in all libraries as well as cleans up any libraries stuck in deletion.