Immich crashes eventually #2832

Closed
opened 2026-02-05 07:05:52 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @pflavio on GitHub (Apr 9, 2024).

The bug

After updating to the latest release I have experienced a few issues with my Immich instance running in Docker.

I'm running it in a VM running Ubuntu server and haven't had any issues so far. Today I upgraded and then I noticed some strange behavior.

Most notable, the space utilization on the left is wrong. It shows that same value for all users, but no one has a set quota.
image

Also it's wrong, as you can see in this screenshot from server stats (which is correct):
image

I thought it was just something cosmetic that would be fixed eventually, so I didn't bother. I started uploading a few hundred images when suddenly, all new uploads would produce internal server errors such as the one below:
image

Eventually Immich would crash showing:

"Error - Something went wrong

Hmm, not sure about that. Check the logs or open a ticket? (500)"

and/or

"Error - Something went wrong

Failed to get server config (500)
Stacktrace

he@http://192.168.1.13:2283/_app/immutable/chunks/fetch-client.CUHQ0TcQ.js:1:2911
de@http://192.168.1.13:2283/_app/immutable/chunks/fetch-client.CUHQ0TcQ.js:1:2835"

Now in the logs I get the errors like this in immich-server:

[Nest] 7 - 04/09/2024, 6:53:54 PM ERROR [ReplyError: ERR Error running script (call to f_b13c1227791fc1cac2ed45d06765e4dc2618b9cb): @user_script:225: @user_script: 225: -MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.

And like this in immich-redis:
'1:M 09 Apr 2024 18:56:24.062 * 100 changes in 300 seconds. Saving...

1:M 09 Apr 2024 18:56:24.063 * Background saving started by pid 57

57:C 09 Apr 2024 18:56:24.064 # Write error saving DB on disk: No space left on device

1:M 09 Apr 2024 18:56:24.163 # Background saving error'

The issue seems to be no space left. That can't be right though. As you can see from the second screenshot, only about 80 GB are used atm and the ssd drive that is used has a capacity of 4 TB.

A restart of the containers didn't fix it, so I have to stop them and run docker rm $(docker ps -a -q) and docker rmi $(docker images -q) and then docker compose up to create them fresh. Then it works until it doesn't again (the cycle starts fresh).

Please advice on what to do. Thanks (also for the great product)!

The OS that Immich Server is running on

Ubuntu 22.04.4 LTS

Version of Immich Server

v1.101.0

Version of Immich Mobile App

1.100.0 build.130

Platform with the issue

  • Server
  • Web
  • 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}
    command: ['start.sh', 'immich']
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/hardware-transcoding
    #   file: hwaccel.transcoding.yml
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    command: ['start.sh', 'microservices']
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    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:51d6c56749a4243096327e3fb964a48ed92254357108449cb6e23999c37773c5
    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}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

volumes:
  pgdata:
  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=/media/pflavio/T9/cloud/immich

# 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=xxx

# 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. Notice incorrect storage
2. Ignore, start uploading pictures
3. Uploading fails eventually
4. Immich crashes

Additional information

No response

Originally created by @pflavio on GitHub (Apr 9, 2024). ### The bug After updating to the latest release I have experienced a few issues with my Immich instance running in Docker. I'm running it in a VM running Ubuntu server and haven't had any issues so far. Today I upgraded and then I noticed some strange behavior. Most notable, the space utilization on the left is wrong. It shows that same value for all users, but no one has a set quota. ![image](https://github.com/immich-app/immich/assets/151925154/47f00474-5d47-4908-a3a4-8821221732d4) Also it's wrong, as you can see in this screenshot from server stats (which is correct): ![image](https://github.com/immich-app/immich/assets/151925154/2cc65017-8ceb-4556-9c03-731c3ed565e3) I thought it was just something cosmetic that would be fixed eventually, so I didn't bother. I started uploading a few hundred images when suddenly, all new uploads would produce internal server errors such as the one below: ![image](https://github.com/immich-app/immich/assets/151925154/6f6fce66-051d-4b5a-9a24-e89546cfc0e2) Eventually Immich would crash showing: "Error - Something went wrong Hmm, not sure about that. Check the logs or open a ticket? (500)" and/or "Error - Something went wrong Failed to get server config (500) Stacktrace he@http://192.168.1.13:2283/_app/immutable/chunks/fetch-client.CUHQ0TcQ.js:1:2911 de@http://192.168.1.13:2283/_app/immutable/chunks/fetch-client.CUHQ0TcQ.js:1:2835" Now in the logs I get the errors like this in immich-server: `[Nest] 7 - 04/09/2024, 6:53:54 PM ERROR [ReplyError: ERR Error running script (call to f_b13c1227791fc1cac2ed45d06765e4dc2618b9cb): @user_script:225: @user_script: 225: -MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.` And like this in immich-redis: '1:M 09 Apr 2024 18:56:24.062 * 100 changes in 300 seconds. Saving... 1:M 09 Apr 2024 18:56:24.063 * Background saving started by pid 57 57:C 09 Apr 2024 18:56:24.064 # Write error saving DB on disk: No space left on device 1:M 09 Apr 2024 18:56:24.163 # Background saving error' The issue seems to be no space left. That can't be right though. As you can see from the second screenshot, only about 80 GB are used atm and the ssd drive that is used has a capacity of 4 TB. A restart of the containers didn't fix it, so I have to stop them and run `docker rm $(docker ps -a -q)` and `docker rmi $(docker images -q)` and then `docker compose up` to create them fresh. Then it works until it doesn't again (the cycle starts fresh). Please advice on what to do. Thanks (also for the great product)! ### The OS that Immich Server is running on Ubuntu 22.04.4 LTS ### Version of Immich Server v1.101.0 ### Version of Immich Mobile App 1.100.0 build.130 ### Platform with the issue - [X] Server - [X] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML # # 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} command: ['start.sh', 'immich'] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro env_file: - .env ports: - 2283:3001 depends_on: - redis - database restart: always immich-microservices: container_name: immich_microservices image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/hardware-transcoding # file: hwaccel.transcoding.yml # service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding command: ['start.sh', 'microservices'] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro env_file: - .env 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:51d6c56749a4243096327e3fb964a48ed92254357108449cb6e23999c37773c5 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} volumes: - pgdata:/var/lib/postgresql/data restart: always volumes: pgdata: model-cache: ``` ### Your .env content ```Shell # 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=/media/pflavio/T9/cloud/immich # 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=xxx # 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 ```bash 1. Notice incorrect storage 2. Ignore, start uploading pictures 3. Uploading fails eventually 4. Immich crashes ``` ### Additional information _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#2832