Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Backup from IOS stalls after an indeterminate number of files #4868

Closed
1 of 3 tasks
akropp opened this issue Nov 6, 2023 · 8 comments
Closed
1 of 3 tasks

[BUG] Backup from IOS stalls after an indeterminate number of files #4868

akropp opened this issue Nov 6, 2023 · 8 comments

Comments

@akropp
Copy link

akropp commented Nov 6, 2023

The bug

I have been trying to do the initial backup from IOS to my server with about 48,000 images/videos. Even with the app in the foreground (on the Backup page), it will upload anywhere between 10 and 100 images quickly, and then stall. Sometimes, it will restart after some amount of time, but often the only way to get it to resume backing up is to click the Cancel button and then Start Backup again.

When it stalls, it has always just finished uploading a file. I have confirmed that the last file it says it uploaded is in fact in my library and displays in the UI, so it seems to be in the app. I don't see any errors or anything unusual in the server logs.

The OS that Immich Server is running on

Ubuntu 22.04.3 LTS x86_64

Version of Immich Server

v1.84.0

Version of Immich Mobile App

1.84.0 build.124

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: ["start.sh", "immich"]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - /mnt/Multimedia:/mnt/Multimedia
    env_file:
      - .env
    depends_on:
      - redis
      - database
      - typesense
    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    extends:
      file: hwaccel.yml
      service: hwaccel
    command: ["start.sh", "microservices"]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - /mnt/Multimedia:/mnt/Multimedia
    env_file:
      - .env
    depends_on:
      - redis
      - database
      - typesense
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always
    ports:
      - 3003:3003

  immich-web:
    container_name: immich_web
    image: ghcr.io/immich-app/immich-web:${IMMICH_VERSION:-release}
    env_file:
      - .env
    restart: always

  typesense:
    container_name: immich_typesense
    image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd
    environment:
      - TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
      - TYPESENSE_DATA_DIR=/data
      # remove this to get debug messages
      - GLOG_minloglevel=1
    volumes:
      - tsdata:/data
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3
    restart: always

  database:
    container_name: immich_postgres
    image: postgres:14-alpine@sha256:28407a9961e76f2d285dc6991e8e48893503cc3836a4755bbc2d40bcc272a441
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

  immich-proxy:
    container_name: immich_proxy
    image: ghcr.io/immich-app/immich-proxy:${IMMICH_VERSION:-release}
    environment:
      # Make sure these values get passed through from the env file
      - IMMICH_SERVER_URL
      - IMMICH_WEB_URL
    ports:
      - 2283:8080
    depends_on:
      - immich-server
      - immich-web
    restart: always

volumes:
  pgdata:
  model-cache:
  tsdata:

Your .env content

# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=./data

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secrets for postgres and typesense. You should change these to random passwords
TYPESENSE_API_KEY=####
DB_PASSWORD=####

# The values below this line do not need to be changed
###################################################################################
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

REDIS_HOSTNAME=immich_redis

Reproduction steps

1. Have a large number of images to back up
2. Open the iOS app
3. Watch it back up some number of images and then stop

Additional information

Not sure if turning on more debugging on the server would help. As I mentioned, I don't see anything in the logs on the server that indicates a problem. Not sure if there is a way to get debugging out of the ios client.

This is the second time (from a completely new install) that I have experienced this problem.

@maffinca69
Copy link

+1. I'm confirm it. Also, i found addition problem which related current issue. When all photos is uploaded, ios app trying uploading same files (50%). But all here photos already saved on my server
i'm must be creating new issue?

@simoautio
Copy link

I have the same. When the upload stalled last time, i had this in the logs (the filename matches with last one it uploaded, or got to 100% with)

Catch all error: PathNotFoundException: Cannot delete file, path = '/private/var/mobile/Containers/Data/Application/53F7766C-501C-4C40-B50A-E0515EE50008/tmp/.image/CA0A67DB-D081-4FED-8BE3-A3A98E7E26C8_L0_001_1700603484.737668_o_IMG_7393.HEIC' (OS Error: No such file or directory, errno = 2) - PathNotFoundException: Cannot delete file, path = '/private/var/mobile/Containers/Data/Application/53F7766C-501C-4C40-B50A-E0515EE50008/tmp/.image/CA0A67DB-D081-4FED-8BE3-A3A98E7E26C8_L0_001_1700603484.737668_o_IMG_7393.HEIC' (OS Error: No such file or directory, errno = 2)

And
#0 _File.throwIfError (dart:io/file_impl.dart:675)
#1 _File._deleteSync (dart:io/file_impl.dart:329)
#2 FileSystemEntity.deleteSync (dart:io/file_system_entity.dart:424)
#3 BackupService.backupAsset (package:immich_mobile/modules/backup/services/backup.service.dart:337)

#4 BackupNotifier.startBackupProcess (package:immich_mobile/modules/backup/providers/backup.provider.dart:445)

#5 BackupNotifier._resumeBackup (package:immich_mobile/modules/backup/providers/backup.provider.dart:575)

@charleslcso
Copy link

1.89. Same issue.

Me first time Immich user. First time iOS app to backup.

It uploaded to about 100, then stalls. Wait an undeterministic amount of time, it went up ato about 125-150, and stalls again.

I didn't Pause or Stop it. I let it sit overnight.

Then worse comes worse.

All my 355 albums (selected and wanted to backup) has gone. Backup list shows 0. Spinning wheel again. Spins for a long time without seeing the 355 albums again.

Killed the app and it continue to spin. Albums never show up again after 30mins.

@alextran1502
Copy link
Contributor

@charleslcso are you using iCloud?

@charleslcso
Copy link

@charleslcso are you using iCloud?

Yes Alex.

@alextran1502
Copy link
Contributor

@charleslcso we haven't put in a mechanism to handle user with iCloud usage properly since I don't use it. The stalling mean the app trying to download the photo on iCloud first before uploading it to the Immich server

@charleslcso
Copy link

charleslcso commented Dec 4, 2023

@alextran1502 great to learn iCloud is not being handled.

However, the other issue is that the full, manually selected albums reverted to 0. I believe that's another issue. What do ya think?

I believe immich is not for iCloud users, yet.

Put it this way, I have been on the side line for 2 years. During this time I got FileRun up and running. Eager to give Immich a try now. You don't know how excited I was when I see I can backup ALL my iCloud albums in 1 single Immich.app! No more icloudpd and shell script!

But unfortunately my excitement died the same night. 😔😔😔

@alextran1502
Copy link
Contributor

Handled backup iCloud asset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants