immich icon indicating copy to clipboard operation
immich copied to clipboard

iOS app unusable and very buggy with 90k+ item library

Open Piipperi opened this issue 9 months ago • 5 comments

The bug

iOS app has become very unusable when backup is enabled on huge iCloud Photo library with tens of thousands of images and videos:

  • Backup remainder shows 0 assets, despite it actively uploading new ones.
  • After photo backing up is complete, there is still always a loading wheel on the top right cloud icon.
  • The app freezes a lot, and especially during uploading, the app can sometimes freeze for up to a minute on an iPhone 15 Pro.
  • Phone heats up a lot while using the app, and uses a lot of battery when on foreground (even when not seemingly uploading anything).

The last two have always been an issue since I started using Immich back in summer 2024, but the other ones are relatively new. I should point out this seems to only affect the device that is backing up the photos from the library in question, as Immich is running smooth on iPad Pro M1 (no backup enabled) and Pixel 9 Pro (has backup enabled for on-device folders)

The OS that Immich Server is running on

ACM 4.3.3.RC92

Version of Immich Server

1.126.1

Version of Immich Mobile App

1.126.1

Platform with the issue

  • [ ] Server
  • [ ] Web
  • [x] Mobile

Your docker-compose.yml content

#
# WARNING: Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.
#

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - 2283:2283
    depends_on:
      - redis
      - database
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
    #   file: hwaccel.ml.yml
    #   service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always

  redis:
    container_name: immich_redis
    image: registry.hub.docker.com/library/redis:6.2-alpine@sha256:84882e87b54734154586e5f8abd4dce69fe7311315e2fc6d67c29614c8de2672
    restart: always

  database:
    container_name: immich_postgres
    image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
    volumes:
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    restart: always
    command: ["postgres", "-c" ,"shared_preload_libraries=vectors.so", "-c", 'search_path="$$user", public, vectors', "-c", "logging_collector=on", "-c", "max_wal_size=2GB", "-c", "shared_buffers=512MB", "-c", "wal_compression=on"]

volumes:
  model-cache:

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=./library
# The location where your database files are stored
DB_DATA_LOCATION=./postgres

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

# Connection secret for postgres. You should change it to a random password
DB_PASSWORD=[redacted]

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

Reproduction steps

  1. Have a huge iCloud Library with tens of thousands of items
  2. Backup everything to Immich
  3. Immich should now lag and show these issues.

Relevant log output


Additional information

No response

Piipperi avatar Feb 26 '25 15:02 Piipperi

This is, unfortunately, a problem we haven't yet optimized for. When your entire library is on iCloud, the app will first download those assets to the device and then upload them to the Immich server.

So the constant downloading/uploading will for sure make the phone hot, especially with a huge iCloud library as yours

alextran1502 avatar Feb 26 '25 16:02 alextran1502

I mean I have everything technically uploaded to Immich already, and my iCloud library is 800+ GB, of which only like 16 GB are on device.

Immich only currently has to upload new images that are already on the phone, but this is where it just stutters. My internet connection and router is really good as well, and Google Photos still can backup the entire library just fine.

Piipperi avatar Feb 26 '25 16:02 Piipperi

Tracking in #9164

mmomjian avatar Feb 26 '25 16:02 mmomjian

I think this should be tracked as an issue rather than a discussion, especially as this is due to poor optimization rather than a hardware limitation.

mertalev avatar Feb 26 '25 18:02 mertalev

We should probably close the discussion then.

mmomjian avatar Feb 26 '25 18:02 mmomjian

Yeah, and actually there was another request to only sync media after/before particular date. This may help in several circumstances.

akostadinov avatar Mar 15 '25 11:03 akostadinov

one additional thing on the mobile app is that if the photos are on multiple devices (iphone/ipad) both of whom have icloud backups enabled that the second device has issues ever catching up (i have 26k photos in that library).

would it be advantageous to download all file id's to each connected device and check these against the server locally before even attempting to download from icloud (not sure if that's possible)/upload?

daallgeier avatar Apr 01 '25 19:04 daallgeier

similar issue even if I turn on ignore icloud sync. It struggles to even manage the local folders. every time sync starts it freezes for 5-10 minutes even though a complete over night backup happened to immich. This from my kids iphone 12 74K images and videos, simply chocking it. I run on a unraid docker stack and the web performance seems fine. My smaller 50k or so library seems to run fine on a iphone 15p... not sure if its hardware or what causing immich app to struggle and die so hard.

bushibot avatar Apr 21 '25 17:04 bushibot

Same issue for me but I don't even use Icloud. I haven't the oppertunitiy to test it on a library smaller then 40000 images since I only have one apple device, I imagine in that scenero it wouldn't occur.

superboo07 avatar Apr 24 '25 01:04 superboo07

same issue for me, The mobile app is very slow for 50k images, select albums stuck the app

roisec avatar Apr 28 '25 06:04 roisec

With which release was this completed? I still have these issues on IOS devices.

Quadrubo avatar Jun 08 '25 10:06 Quadrubo

App is completely unusable on an account with 1tb of pictures/videos on latest version. Scrolling Lags on an iPhone 14 Pro Max and click anything on the backup screen takes about 30secs.

xeong5 avatar Jun 08 '25 12:06 xeong5

With which release was this completed?

It wasn't, it was closed as a duplicate of another issue which is still open.

bo0tzz avatar Jun 08 '25 14:06 bo0tzz

Which issue is this one a duplicate of? In the timeline of this issue it says 'closed as completed'.

scottruzal avatar Jun 08 '25 14:06 scottruzal

#10030. Are you on the github app? It's shown correctly on the website.

bo0tzz avatar Jun 08 '25 15:06 bo0tzz

Ah yes, it appears the app erroneously displays this issue as completed. Thank you!

Screenshot_20250608-112811.png

scottruzal avatar Jun 08 '25 15:06 scottruzal

Same here. Constant temporary freezes on fully uploaded albums of about 60k items

yabolek avatar Jun 21 '25 08:06 yabolek

I have 460k photos in the library and the iOS app is completely unusable.

jankuca avatar Aug 17 '25 17:08 jankuca