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

Initial IOS app sync never completes with 500k+ assets (IsarError: The database is full.) #11064

Closed
3 tasks
iansewell opened this issue Jul 13, 2024 · 3 comments · Fixed by #11065
Closed
3 tasks

Comments

@iansewell
Copy link

iansewell commented Jul 13, 2024

The bug

I have an underpowered server with 400k+ assets (mostly external lib). WebUI works fine. (somewhat slow). When I try to connect iphone client, initial timeline sync never completes. I have waited 12+ hours for it but it appears stuck. Would be nice to have a progress bar.
this is most likely related to #7166 , as I see the same IsarError:
2024-07-11 02:16:46.487832 | SEVERE | SyncService | Failed to upsert 528633 assets into the DB | IsarError: The database is full. |

The OS that Immich Server is running on

Windows 10 (also tried ubuntu 22.04.3 server, same failure)

Version of Immich Server

v1.107.2

Version of Immich Mobile App

1.108.0 build 163

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

#
# 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_servera
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - "d:/personal photos 10:/mnt/media/pp10"
      - "d:/personal photos 9:/mnt/media/pp9"
      - "d:/personal photos 8:/mnt/media/pp8"
      - "d:/personal photos 7:/mnt/media/pp7"
      - "d:/personal photos 6:/mnt/media/pp6"
      - "e:/personal photos 5:/mnt/media/pp5"
      - "e:/personal photos 4:/mnt/media/pp4"
      - "e:/personal photos 3:/mnt/media/pp3"
      - "e:/personal photos 2:/mnt/media/pp2"
      - "e:/personal photos:/mnt/media/pp"
      - "e:/personal movies:/mnt/media/pm"
      - "e:/personal movies 2009-2010:/mnt/media/pm2"
      - "e:/icloudwendy:/mnt/media/icloudwendy"
      - "e:/icloudian:/mnt/media/icloudian"
    env_file:
      - .env
    ports:
      - 2283:3001
    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: redis:6.2-alpine@sha256:afb290a0a0d0b2bd7537b62ebff1eb84d045c757c1c31ca2ca48c79536c0de82
    restart: always

  database:
    container_name: immich_postgres
    image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    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

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=./library

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

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

REDIS_HOSTNAME=immich_redis

Reproduction steps

1.unintall immich app
2.reinstall
3.connect to server
full sync never completes

Relevant log output

2024-07-11 02:17:01.900204 | INFO     | AssetNotifier        | Load assets: 1279810ms |
2024-07-11 02:17:01.900181 | INFO     | AlbumService         | Syncing completed. Changes: true |
2024-07-11 02:17:01.900175 | FINE     | SyncService          | 0 assets to delete, 0 to update |
2024-07-11 02:17:01.900171 | FINE     | SyncService          | Syncing all local albums almost done. Collected 0 asset candidates to delete |
2024-07-11 02:17:01.900161 | INFO     | SyncService          | Added a new local album to DB: Long Exposure |
2024-07-11 02:17:01.899013 | INFO     | SyncService          | Upserted 9 assets into the DB |
2024-07-11 02:17:01.898342 | INFO     | SyncService          | 0 assets already existed in DB, to upsert 9 |
2024-07-11 02:17:01.655204 | INFO     | SyncService          | Syncing a new local album to DB: Long Exposure |
2024-07-11 02:17:01.655196 | INFO     | SyncService          | Added a new local album to DB: 2019 cousins summer |
2024-07-11 02:17:01.654023 | INFO     | SyncService          | Upserted 25 assets into the DB |
2024-07-11 02:17:01.653490 | INFO     | SyncService          | 0 assets already existed in DB, to upsert 25 |
2024-07-11 02:17:01.610077 | INFO     | SyncService          | Syncing a new local album to DB: 2019 cousins summer |
2024-07-11 02:17:01.525937 | INFO     | SyncService          | Upserted 44 assets into the DB |
2024-07-11 02:17:00.352343 | INFO     | SyncService          | Upserted 225 assets into the DB |
2024-07-11 02:16:59.170838 | SEVERE   | ImmichErrorLogger    | PlatformDispatcher - Catch all | IsarError: The database is full. |

2024-07-11 02:16:56.888658 | INFO     | AlbumService         | refreshDeviceAlbums is already in progress |
2024-07-11 02:16:56.882780 | FINE     | socket_io_client:engine.Socket | flushing 1 packets in socket |
2024-07-11 02:16:56.882764 | FINE     | socket_io_client:engine.Socket | socket receive: type "ping", data "null" |
2024-07-11 02:16:46.487832 | SEVERE   | SyncService          | Failed to upsert 528633 assets into the DB | IsarError: The database is full. |
2024-07-11 02:16:41.586142 | FINE     | AssetService         | Received 8633 assets from fbc212ae-8081-478d-9283-247ea3af0430 to ffffa5cb-2784-4808-ab50-8f102d2190cb |
2024-07-11 02:16:27.236399 | FINE     | socket_io_client:engine.Socket | flushing 1 packets in

Additional information

No response

@alextran1502
Copy link
Contributor

How much free space do you have on your iPhone?

@alextran1502
Copy link
Contributor

AH let me try to increase the size of maxSizeMib and see if it helps

@iansewell
Copy link
Author

How much free space do you have on your iPhone?

20 gb.

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

Successfully merging a pull request may close this issue.

2 participants