Unable to sync from android app. IsarError: The database is full. #3890

Closed
opened 2026-02-05 09:25:21 +03:00 by OVERLORD · 7 comments
Owner

Originally created by @satmandu on GitHub (Jul 16, 2024).

The bug

I tried to sync from the Android app and after a while it failed.

Message:
Failed to put new asset into db
Details:
IsarError: The database is full.
From:
SyncService

The OS that Immich Server is running on

Ubuntu 24.04 running docker

Version of Immich Server

v1.108.0

Version of Immich Mobile App

v1.108.0

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}
    devices:
      - /dev/dri/renderD128:/dev/dri/renderD128
      - /dev/dri/card0:/dev/dri/card0
      - /dev/kfd:/dev/kfd
        #extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/hardware-transcoding
       #file: hwaccel.transcoding.yml
       #service: vaapi # 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: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}
    volumes:
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    restart: always

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

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

TZ=America/New_York

Reproduction steps

Uploading from the app is failing. I was able to import many photos from the command line...

Relevant log output

No response

Additional information

No response

Originally created by @satmandu on GitHub (Jul 16, 2024). ### The bug I tried to sync from the Android app and after a while it failed. ``` Message: Failed to put new asset into db Details: IsarError: The database is full. From: SyncService ``` ### The OS that Immich Server is running on Ubuntu 24.04 running docker ### Version of Immich Server v1.108.0 ### Version of Immich Mobile App v1.108.0 ### Platform with the issue - [ ] Server - [ ] Web - [X] 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} devices: - /dev/dri/renderD128:/dev/dri/renderD128 - /dev/dri/card0:/dev/dri/card0 - /dev/kfd:/dev/kfd #extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/hardware-transcoding #file: hwaccel.transcoding.yml #service: vaapi # 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: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} volumes: - ${DB_DATA_LOCATION}:/var/lib/postgresql/data restart: always volumes: 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=********* # 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=************ # The values below this line do not need to be changed ################################################################################### DB_USERNAME=postgres DB_DATABASE_NAME=immich TZ=America/New_York ``` ### Reproduction steps ```bash Uploading from the app is failing. I was able to import many photos from the command line... ``` ### Relevant log output _No response_ ### Additional information _No response_
Author
Owner

@alextran1502 commented on GitHub (Jul 16, 2024):

Is your docker-compose an actual file on your server, because that is the outdated compose meaning the server should not start up.

@alextran1502 commented on GitHub (Jul 16, 2024): Is your docker-compose an actual file on your server, because that is the outdated compose meaning the server should not start up.
Author
Owner

@satmandu commented on GitHub (Jul 16, 2024):

I just updated the docker-compose.yml file to this:

#
# 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}
    # extends:
    #   file: hwaccel.transcoding.yml
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    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}
    devices:
      - /dev/dri/renderD128:/dev/dri/renderD128
      - /dev/dri/card0:/dev/dri/card0
      - /dev/kfd:/dev/kfd
        #extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/hardware-transcoding
       #file: hwaccel.transcoding.yml
       #service: vaapi # 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: docker.io/redis:6.2-alpine@sha256:328fe6a5822256d065debb36617a8169dbfbd77b797c525288e465f56c1d392b
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always

  database:
    container_name: immich_postgres
    image: docker.io/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
    healthcheck:
      test: pg_isready --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' || exit 1; Chksum="$$(psql --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' --tuples-only --no-align --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo "checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1
      interval: 5m
      start_interval: 30s
      start_period: 5m
    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"]
    restart: always

volumes:
  model-cache:

This is what I run from systemd:

[Unit]
Description=Immich Server
After=docker.service
Requires=docker.service

[Service]
Type=simple
ExecStartPre=docker pull ghcr.io/immich-app/immich-server:release
ExecStart=/bin/bash -c "docker compose -f /home/immich/docker/docker-compose.yml up"
ExecStop=/bin/bash -c "docker compose -f /home/immich/docker/docker-compose.yml stop"

[Install]
WantedBy=multi-user.target

The server is starting.

 systemctl status immich.service 
● immich.service - Immich Server
     Loaded: loaded (/etc/systemd/system/immich.service; enabled; preset: enabled)
     Active: active (running) since Tue 2024-07-16 08:11:26 EDT; 5s ago
    Process: 615491 ExecStartPre=docker pull ghcr.io/immich-app/immich-server:release (code=exited, status=0/SUCCESS)
   Main PID: 615502 (docker)
      Tasks: 18 (limit: 55929)
     Memory: 18.9M (peak: 19.5M)
        CPU: 112ms
     CGroup: /system.slice/immich.service
             ├─615502 docker compose -f /home/immich/docker/docker-compose.yml up
             └─615519 /usr/libexec/docker/cli-plugins/docker-compose compose -f /home/immich/docker/docker-compose.yml up

Jul 16 08:11:30 cheekon bash[615519]:  Container immich_postgres  Recreate
Jul 16 08:11:30 cheekon bash[615519]:  Container immich_machine_learning  Created
Jul 16 08:11:30 cheekon bash[615519]:  Container immich_redis  Recreate
Jul 16 08:11:30 cheekon bash[615519]:  Container immich_redis  Recreated
Jul 16 08:11:30 cheekon bash[615519]:  Container immich_postgres  Recreated
Jul 16 08:11:30 cheekon bash[615519]:  Container immich_microservices  Recreate
Jul 16 08:11:30 cheekon bash[615519]:  Container immich_server  Recreate
Jul 16 08:11:30 cheekon bash[615519]:  Container immich_microservices  Recreated
Jul 16 08:11:30 cheekon bash[615519]:  Container immich_server  Recreated
Jul 16 08:11:30 cheekon bash[615519]: Attaching to immich_machine_learning, immich_microservices, immich_postgres, immich_redis, immich_server
@satmandu commented on GitHub (Jul 16, 2024): I just updated the docker-compose.yml file to this: ``` # # 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} # extends: # file: hwaccel.transcoding.yml # service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding 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} devices: - /dev/dri/renderD128:/dev/dri/renderD128 - /dev/dri/card0:/dev/dri/card0 - /dev/kfd:/dev/kfd #extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/hardware-transcoding #file: hwaccel.transcoding.yml #service: vaapi # 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: docker.io/redis:6.2-alpine@sha256:328fe6a5822256d065debb36617a8169dbfbd77b797c525288e465f56c1d392b healthcheck: test: redis-cli ping || exit 1 restart: always database: container_name: immich_postgres image: docker.io/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 healthcheck: test: pg_isready --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' || exit 1; Chksum="$$(psql --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' --tuples-only --no-align --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo "checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1 interval: 5m start_interval: 30s start_period: 5m 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"] restart: always volumes: model-cache: ``` This is what I run from systemd: ``` [Unit] Description=Immich Server After=docker.service Requires=docker.service [Service] Type=simple ExecStartPre=docker pull ghcr.io/immich-app/immich-server:release ExecStart=/bin/bash -c "docker compose -f /home/immich/docker/docker-compose.yml up" ExecStop=/bin/bash -c "docker compose -f /home/immich/docker/docker-compose.yml stop" [Install] WantedBy=multi-user.target ``` The server is starting. ``` systemctl status immich.service ● immich.service - Immich Server Loaded: loaded (/etc/systemd/system/immich.service; enabled; preset: enabled) Active: active (running) since Tue 2024-07-16 08:11:26 EDT; 5s ago Process: 615491 ExecStartPre=docker pull ghcr.io/immich-app/immich-server:release (code=exited, status=0/SUCCESS) Main PID: 615502 (docker) Tasks: 18 (limit: 55929) Memory: 18.9M (peak: 19.5M) CPU: 112ms CGroup: /system.slice/immich.service ├─615502 docker compose -f /home/immich/docker/docker-compose.yml up └─615519 /usr/libexec/docker/cli-plugins/docker-compose compose -f /home/immich/docker/docker-compose.yml up Jul 16 08:11:30 cheekon bash[615519]: Container immich_postgres Recreate Jul 16 08:11:30 cheekon bash[615519]: Container immich_machine_learning Created Jul 16 08:11:30 cheekon bash[615519]: Container immich_redis Recreate Jul 16 08:11:30 cheekon bash[615519]: Container immich_redis Recreated Jul 16 08:11:30 cheekon bash[615519]: Container immich_postgres Recreated Jul 16 08:11:30 cheekon bash[615519]: Container immich_microservices Recreate Jul 16 08:11:30 cheekon bash[615519]: Container immich_server Recreate Jul 16 08:11:30 cheekon bash[615519]: Container immich_microservices Recreated Jul 16 08:11:30 cheekon bash[615519]: Container immich_server Recreated Jul 16 08:11:30 cheekon bash[615519]: Attaching to immich_machine_learning, immich_microservices, immich_postgres, immich_redis, immich_server ```
Author
Owner

@satmandu commented on GitHub (Jul 16, 2024):

Interestingly that made the error go away. I guess I will see if the uploads finish.

@satmandu commented on GitHub (Jul 16, 2024): Interestingly that made the error go away. I guess I will see if the uploads finish.
Author
Owner

@alextran1502 commented on GitHub (Jul 16, 2024):

You don't need immich-microservices any more. Please make sure to bring the container down then bring them up with --remove-orphans flag

@alextran1502 commented on GitHub (Jul 16, 2024): You don't need immich-microservices any more. Please make sure to bring the container down then bring them up with --remove-orphans flag
Author
Owner

@satmandu commented on GitHub (Jul 16, 2024):

You don't need immich-microservices any more. Please make sure to bring the container down then bring them up with --remove-orphans flag

I will remove immich-microservices.

What do I need to pass the --remove-orphans flag to?

@satmandu commented on GitHub (Jul 16, 2024): > You don't need immich-microservices any more. Please make sure to bring the container down then bring them up with --remove-orphans flag I will remove immich-microservices. What do I need to pass the `--remove-orphans` flag to?
Author
Owner

@alextran1502 commented on GitHub (Jul 16, 2024):

You don't need immich-microservices any more. Please make sure to bring the container down then bring them up with --remove-orphans flag

I will remove immich-microservices.

What do I need to pass the --remove-orphans flag to?

To make sure that it removes the immich-microservices container if it still exists.

@alextran1502 commented on GitHub (Jul 16, 2024): > > You don't need immich-microservices any more. Please make sure to bring the container down then bring them up with --remove-orphans flag > > I will remove immich-microservices. > > What do I need to pass the `--remove-orphans` flag to? To make sure that it removes the `immich-microservices` container if it still exists.
Author
Owner

@satmandu commented on GitHub (Jul 16, 2024):

Ah sorry, I should have just googled.

I was just looking for where that flag should go, and that appears to be docker compose down --remove-orphans.

@satmandu commented on GitHub (Jul 16, 2024): Ah sorry, I should have just googled. I was just looking for where that flag should go, and that appears to be `docker compose down --remove-orphans`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#3890