File index crawls all app data — large Immich library exhausts inotify watches, umbreld then burns ~50% CPU continuously

I’ve setup UmbrelOS along with Immich and Nextcloud. I’ve been troubleshooting some issues with AI, but there is one I can’t solve and AI suggests I post it here. I’ll put it down and see what forum members say, thank you.

Running umbrelOS on a DIY amd64 box (i5-3570K, 16GB RAM). Apps: Nextcloud, Immich, Cloudflare Tunnel, Tailscale.

After importing a large photo library into Immich (125,000 photos, 4,600 videos, 266GB), umbrel’s file index started failing and the machine became intermittently unresponsive.

What I see in the logs:

The file index treats /Apps as one root, which for me is 556,877 entries:

[files:file-index] Reconciled '/Apps' in 124920ms (556877 entries)

That exceeds the default inotify watch limit, so Watchman can’t place watches:

opendir(/home/umbrel/umbrel/app-data/nextcloud/data/...)
  -> The user limit on the total number of inotify watches was reached;
     increase the fs.inotify.max_user_watches sysctl
All requests will continue to fail with this message until you resolve
the underlying problem.

824 occurrences over two days.

The knock-on effect is the real problem. Once it can’t place watches, it appears to fall back to full re-crawls on a timer. The frequency jumped the moment the limit was first hit:

Sep 14:  26 reconciles/day
Sep 15: 199
Sep 16: 207

Each pass takes about two minutes. On Sep 16 that’s 479 minutes — eight hours — of crawling in a 17-hour window, with umbreld sitting at 80%+ CPU in htop. The machine has become unresponsive several times, including once while I was away from home.

Systemd is also affected, since inotify exhaustion stops it monitoring cgroups:

Failed to add control inotify watch descriptor: No space left on device
containerd: failed to watch oom events: no space left on device

Workaround: sysctl -w fs.inotify.max_user_watches=1048576 — but this doesn’t survive a reboot because /etc is reset on the immutable root, so there’s no way to make it permanent.

Questions:

  1. Could umbrelOS raise the default inotify limit, scaled to app data size?
  2. Could the file index exclude large media app directories, or be made optional per app?
  3. Is there a supported way to persist a sysctl on umbrelOS?

Happy to provide full logs.


The above is all AI written, I hope it makes sense. I’m on Umbrel 2.0 Beta 1

To add to this the OS is running on 256GB SATA SSD and the storage pool is 2x 1TB SATA SSD in safe mode / mirror. The machine actually has 32GB DDR3 RAM.

hey, Have you tried updating to umbrelOS 2.0 beta 2? Apparently it includes fixes for file indexing that might help here. Since you’re on beta 1, worth giving that a go and seeing whether the CPU usage settles down.

It seems that the app data folder is not being crawled anymore.