[SOLVED] Immich keeps restarting the backup

Hi guys! I'm having my first attempt at Immich (...and docker, since I'm at it).
So I have successfully set it up (I think), and connected the phone and it started uploading. I have enabled foreground and background backup, and I have only chosen the camera album from my Pixel/GrapheneOS phone. Thing is, after a while (when the screen turns off for a while, even though the app is unrestricted in Android/GrapheneOS, or whenever changing apps...or whenever it feels like), the backup seems to start again from scratch, uploading again and again the first videos from the album (the latest ones, from a couple of days ago), and going its way until somewhere in December 2023...which is where at some point decides to go back and re-do May 2024. It's been doing this a bunch of times.
I've seen mentioned a bunch of times that I should set client_max_body_size on nginx to something large like 5000MB. However in my case it's set to 0, which should read as unrestricted. It doesn't skip large videos of several hundreds megs, it does seem to go through the upload process...but then it keeps redoing them after a while.

Any idea what might be failing? Why does it keep restarting the backup?
By the way, I took a screenshot of the backup a couple days ago, and both the backed up asset number and the remainder has kept the same since (total 2658, backup 179, remainder 2479). This is a couple of days now going through what I'd think is the same files over and over?

SOLVED: So it was about adding the client_max_body_size value to my nginx server. I thought I did, so I was ignoring this even though I saw it mentioned multiple times. Mine is set to value 0, not 50000M as suggested on other threads, but I thought it should work. But then again, it was in the wrong section, applying to a different service/container, not Immich. Adding it to Immich too (with 0, in my case, which should set it to "unlimited") worked immediately after restarting nginx service. Thanks everyone for all the follow ups and suggestions!

Decronym Bot ,

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

Fewer Letters More Letters
HTTP Hypertext Transfer Protocol, the Web
NAS Network-Attached Storage
NFS Network File System, a Unix-based file-sharing protocol known for performance and efficiency
nginx Popular HTTP server

[Thread for this sub, first seen 30th May 2024, 07:15]
[FAQ] [Full list] [Contact] [Source code]

blotz ,
@blotz@lemmy.world avatar

What method are you using to mount the nas for immich. I ran into issues trying to mount my Nas using docker volume+sshfs but ran into zero problems using docker volume/cifs. With sshfs, immich would run until it suddenly stopped working and backups would constantly fail. Restarting the server would cause it to run for a little time longer.

iturnedintoanewt OP ,
@iturnedintoanewt@lemm.ee avatar

I mean, the NAS is already mounted. It's an NFS share, it gets mounted at boot, and it should be just another regular folder, transparent to docker (or anything else).

blotz ,
@blotz@lemmy.world avatar

Ah yeah that should be good. I've never had issues with NFS

4am ,

Is the container running out of disk space for its DB? Is the container running out of memory during the backup process and crashing?

iturnedintoanewt OP , (edited )
@iturnedintoanewt@lemm.ee avatar

The docker container where the DB lives has still another 2GB free to go (I'll increase this). The pictures storage goes to a NAS drive with nearly 10TB of storage left. The docker container has 4GB RAM to run, only immich is running on this at this moment...I didn't seen running too high just yet.

land ,
@land@lemmy.ml avatar

It happened to me as well. To resolve it, go to Administration > Jobs and apply them all available options. I had multiple issues, including this one, but resetting it from the Jobs page fixed it for me.

https://lemmy.ml/pictrs/image/6ef3f745-7618-4b82-a1d2-c7eb6eac32eb.png

iturnedintoanewt OP ,
@iturnedintoanewt@lemm.ee avatar

Thanks! I never walked through that screen yet...I'll try that!

EDIT: Seems...not to have done much. Backup keeps tracking and uploading a ton of files. Many more than what the server actually displays, as in, I've seen the backup go through pictures with dates the server doesn't seem to show. I've seen it slowly go through at least 15-20 videos for example, but the server only acknowledges a grand total of 2 video assets.

EDIT2: Oops, seems the screen eventually turned off and backup stalled...Let's see what it does now...
....aaaand back to May 25th. Yup, still the same problem here :(

land ,
@land@lemmy.ml avatar

Another thing I was doing was to keep spamming the cancel button.

iturnedintoanewt OP ,
@iturnedintoanewt@lemm.ee avatar

I...Think I found the issue. A classic case of "increase max upload size on your reverse proxy". Which I thought I did...
https://lemm.ee/comment/12234368

Thanks for all the help through the process!

tagginator Bot ,

New Lemmy Post: Immich keeps restarting the backup (https://lemmyverse.link/lemmy.world/post/15927332)
Tagging: #SelfHosted

(Replying in the OP of this thread (NOT THIS BOT!) will appear as a comment in the lemmy discussion.)

I am a FOSS bot. Check my README: https://github.com/db0/lemmy-tagginator/blob/main/README.md

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • selfhosted@lemmy.world
  • test
  • worldmews
  • mews
  • All magazines