Immich reindex and app updates
Posted by Amilo21
Hey Tom A couple issues I noticed while trying to import/reindex more files to Immich. Still haven't had a chance to look at your earlier suggestions for the other issues, but will get to it. Don't know is those and these are related, so it might be redundant to share, but I share to be sure. In the resumé it says apps havent updated two days, but it's actually been since the 19/6, so nine days now. Just noticed it. Have a good day and here is TomAI's resumé: Issue 1: sb-immich-server crash-looping on large library reindex SparkBox: Latest | Platform: UGREEN NAS | Install: /opt/sparkbox | Media root: /volume2/Multimedia Hardware: 2 CPU cores, ~7.5GB RAM (~3.5GB free) What's happening: sb-immich-server enters a restart loop during the clipindex reindex (131,732 rows). Docker's healthcheck kills the container before the reindex completes, then it restarts and tries again from scratch — infinite loop. No crash error is logged, the process is killed externally by the healthcheck timeout. Root cause: The clipindex reindex is a heavy, long-running DB operation. On 2 cores with limited free RAM it takes longer than Docker's healthcheck timeout allows. The healthcheck is working as designed — but it's inadvertently killing a legitimate operation. Impact: No new imports or AI processing (smart search, face detection) can complete. Already-imported files are safe in the DB. Suggested fix: Extend the Immich container's healthcheck timeout/start-period for large libraries, or suppress the healthcheck during known long-running reindex operations. --- Issue 2: Scheduled 4AM update cycle failing silently What's happening: Both all and media module updates failed on 6/16 during the automatic night cycle. Rollback triggered automatically. No modules were updated — everything is still running 2-day-old images. Impact: Box is not staying current automatically. Manual retry via Updates tab works, but the root failure cause is unknown. Suggested fix: Surface the actual pull/recreate error in the update history UI so users can see WHY it failed, not just that it did.
4 replies
tomspark wrote:
Thanks for the detailed write-up, and your already-imported photos are safe, so no worries there. Both of these are on my radar now: the Immich reindex getting cut short on a big library, and the nightly update quietly rolling back so you're stuck on older versions. For the update one, could you grab the actual error for me? Over SSH run: cd /opt/sparkbox && sudo sparkbox update Paste whatever it prints when it fails, that'll show exactly why the 4AM cycle is rolling back, which is the missing piece. I'll dig into the Immich reindex loop in parallel. Thanks for being so thorough.
Amilo21 wrote:
Thanks for being so responsive and so polite. That just makes me wanna share as much as possible, as well as I can. Now it looks like it just updated fine, but I might be missing something, or it just worked from inside SSH this time, but I'll let you about actually understanding what's going on and paste what I got: [INFO] Pulling latest images for all enabled modules... [+] Pulling 1/1 ✔ adguard Pulled 1.0s [+] Pulling 3/3 ✔ portainer Pulled 5.9s ✔ homepage Pulled 5.7s ✔ npm Pulled 0.8s [+] Pulling 1/0 ✔ sparkbox-dashboard Skipped - No image to be pulled 0.0s [+] Pulling 4/4 ✔ immich-db Pulled 5.5s ✔ immich-ml Pulled 5.7s ✔ immich-redis Pulled 0.8s ✔ immich-server Pulled 5.5s [+] Pulling 24/24 ✔ deunhealth Pulled 5.3s ✔ sabnzbd Pulled 15.9s ✔ byparr Pulled 10.6s ✔ qbittorrent Pulled 15.9s ✔ bazarr Pulled 201.5s ✔ 30e30cb3f9f4 Pull complete 5.7s ✔ f6a4c3e338ed Pull complete 5.3s ✔ cecbb0efe763 Pull complete 5.3s ✔ 6ca1c0b61f63 Pull complete 5.8s ✔ 87ffd0266c4a Pull complete 27.9s ✔ 476def49116a Pull complete 11.6s ✔ 253c9521bc71 Pull complete 17.7s ✔ radarr Pulled 15.9s ✔ gluetun Pulled 0.9s ✔ lidarr Pulled 192.9s ✔ 751817796bbe Pull complete 5.7s ✔ d246855ebb2c Pull complete 11.6s ✔ 9d669e577343 Pull complete 11.1s ✔ 09eb621d81cc Pull complete 31.8s ✔ 008df34e56a5 Pull complete 17.1s ✔ jellyfin-media Pulled 10.8s ✔ seerr Pulled 10.9s ✔ prowlarr Pulled 15.9s ✔ sonarr Pulled 15.9s [+] Pulling 1/1 ✔ wg-easy Pulled 0.4s [INFO] Recreating containers... [+] Running 1/0 ✔ Container sb-adguard Running 0.0s [+] Running 3/3 ✔ Container sb-npm Started 36.6s ✔ Container sb-homepage Started 35.3s ✔ Container sb-portainer Started 29.0s [+] Running 4/4 ✔ Container sb-immich-ml Recreated 32.9s ✔ Container sb-immich-db Healthy 52.7s ✔ Container sb-immich-redis Healthy 32.9s ✔ Container sb-immich-server Started 8.7s [+] Running 12/12 ✔ Container sb-jellyfin-media Recreated 26.0s ✔ Container sb-gluetun Healthy 16.4s ✔ Container sb-deunhealth Recreated 10.6s ✔ Container sb-bazarr Recreated 26.2s ✔ Container sb-seerr Recreated 21.2s ✔ Container sb-sonarr Recreated 27.5s ✔ Container sb-sabnzbd Recreated 27.5s ✔ Container sb-lidarr Recreated 27.5s ✔ Container sb-radarr Recreated 32.4s ✔ Container sb-qbittorrent Recreated 27.5s ✔ Container sb-prowlarr Recreated 29.4s ✔ Container sb-byparr Started 88.3s [+] Running 1/1 ✔ Container sb-wg-easy Started 45.2s [OK] Update complete. Martin@SecretLairNAS:/opt/sparkbox$
tomspark wrote:
Nice, that's a clean, complete update, so you're fully current now. The one thing still worth pinning down is why the automatic 4AM run rolled back when a manual run like this sails right through, that points at the scheduled timer rather than the update itself. Nothing for you to do right now; if a future nightly one fails, just run that same sudo sparkbox update and you're covered, it's proven to work on your box. I'll keep digging on the automatic-cycle side. Thanks for pasting the full log, genuinely useful.