External libraries offlining all assets when using multiple import paths #5679

Closed
opened 2026-02-05 11:39:08 +03:00 by OVERLORD · 10 comments
Owner

Originally created by @dinosmm on GitHub (Mar 26, 2025).

Originally assigned to: @etnoy on GitHub.

I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.

  • Yes

The bug

As per Alex's request, I am opening this new issue to report that after updating to 1.130.0 (and .1), my timeline goes empty every so often (about half an hour).

I only use an external library that has worked perfectly until the update to 1.130.x.

As per Alex's request, the external library exclusion patterns are as follows (they are the default ones, I never touched them):

/@eaDir/

*/._

When the library empties, if I go to settings and manually scan the external library, the photos reappear immediately.

The OS that Immich Server is running on

Ubuntu 24.04

Version of Immich Server

1.130.1

Version of Immich Mobile App

1.130.1

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

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:
      # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_L>
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - /media/StorageBoxEnc-NC/username/files/Photos:/usr/src/app/external
    env_file:
      - .env
    ports:
      - '2283:2283'
    depends_on:
      - redis
      - database
    restart: unless-stopped
    healthcheck:
      disable: false
    logging:
      driver: "journald"
      options:
        tag: "immich"

  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-accelerat>
    #   file: hwaccel.ml.yml
    #   service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version >
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always
    healthcheck:
      disable: false

  redis:
    container_name: immich_redis
    image: docker.io/redis:6.2-alpine@sha256:eaba718fecd1196d88533de7ba49bf903ad33664a92debb24660a922ecd9cac8
    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:
      # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DA>
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    healthcheck:
      test: >-
        pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" || exit 1;
        Chksum="$$(psql --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" --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:

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

# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wi>
TZ=Europe/London

# 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
# Please use only the characters `A-Za-z0-9`, without special characters or spaces
DB_PASSWORD=<password>

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

Reproduction steps

  1. Update to 1.130.0 or .1 on Immich server with an external library
  2. Timeline is empty
  3. Rescan external library
  4. Timeline photos reappear
  5. Wait for some time
  6. Refresh web and/or mobile app
  7. Timeline is empty again
    ...

Relevant log output

Log can't be more than 65536 characters, if you could please tell me what to look for in the logs I can paste relevant sections.

Additional information

No response

Originally created by @dinosmm on GitHub (Mar 26, 2025). Originally assigned to: @etnoy on GitHub. ### I have searched the existing issues, both open and closed, to make sure this is not a duplicate report. - [x] Yes ### The bug As per Alex's request, I am opening this new issue to report that after updating to 1.130.0 (and .1), my timeline goes empty every so often (about half an hour). I only use an external library that has worked perfectly until the update to 1.130.x. As per Alex's request, the external library exclusion patterns are as follows (they are the default ones, I never touched them): **/@eaDir/** **/._* When the library empties, if I go to settings and manually scan the external library, the photos reappear immediately. ### The OS that Immich Server is running on Ubuntu 24.04 ### Version of Immich Server 1.130.1 ### Version of Immich Mobile App 1.130.1 ### Platform with the issue - [x] Server - [x] Web - [x] Mobile ### Your docker-compose.yml content ```YAML 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: # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_L> - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro - /media/StorageBoxEnc-NC/username/files/Photos:/usr/src/app/external env_file: - .env ports: - '2283:2283' depends_on: - redis - database restart: unless-stopped healthcheck: disable: false logging: driver: "journald" options: tag: "immich" 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-accelerat> # file: hwaccel.ml.yml # service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version > volumes: - model-cache:/cache env_file: - .env restart: always healthcheck: disable: false redis: container_name: immich_redis image: docker.io/redis:6.2-alpine@sha256:eaba718fecd1196d88533de7ba49bf903ad33664a92debb24660a922ecd9cac8 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: # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DA> - ${DB_DATA_LOCATION}:/var/lib/postgresql/data healthcheck: test: >- pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" || exit 1; Chksum="$$(psql --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" --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: ``` ### 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=/home/username/media/StorageBoxPhotosEnc/library # The location where your database files are stored DB_DATA_LOCATION=./postgres # To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wi> TZ=Europe/London # 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 # Please use only the characters `A-Za-z0-9`, without special characters or spaces DB_PASSWORD=<password> # The values below this line do not need to be changed ################################################################################### DB_USERNAME=postgres DB_DATABASE_NAME=immich ``` ### Reproduction steps 1. Update to 1.130.0 or .1 on Immich server with an external library 2. Timeline is empty 3. Rescan external library 4. Timeline photos reappear 5. Wait for some time 6. Refresh web and/or mobile app 7. Timeline is empty again ... ### Relevant log output ```shell Log can't be more than 65536 characters, if you could please tell me what to look for in the logs I can paste relevant sections. ``` ### Additional information _No response_
Author
Owner

@alextran1502 commented on GitHub (Mar 26, 2025):

Can you post a screenshot of your external library exclusion pattern?

Nvm I see it

@etnoy is this another case of not supported pattern? */._

@alextran1502 commented on GitHub (Mar 26, 2025): ~~Can you post a screenshot of your external library exclusion pattern?~~ Nvm I see it @etnoy is this another case of not supported pattern? `*/._ `
Author
Owner

@tanpro260196 commented on GitHub (Mar 26, 2025):

Having similar issue, all photos disappear during schedule scan

Image
Exclude list

Image

@tanpro260196 commented on GitHub (Mar 26, 2025): Having similar issue, all photos disappear during schedule scan ![Image](https://github.com/user-attachments/assets/62fe8c89-d3fa-44fa-ade2-f88ae2b12b86) Exclude list ![Image](https://github.com/user-attachments/assets/0aeb6533-f43d-4fec-acbe-cac9057b6c08)
Author
Owner

@etnoy commented on GitHub (Mar 26, 2025):

Having similar issue, all photos disappear during schedule scan

Image Exclude list

Image

Instead of **/.part and **/.pending, can you try **/.part/** and **/.pending/**?

Same with */._, try */._/* instead

@etnoy commented on GitHub (Mar 26, 2025): > Having similar issue, all photos disappear during schedule scan > > ![Image](https://github.com/user-attachments/assets/62fe8c89-d3fa-44fa-ade2-f88ae2b12b86) Exclude list > > ![Image](https://github.com/user-attachments/assets/0aeb6533-f43d-4fec-acbe-cac9057b6c08) Instead of `**/.part` and `**/.pending`, can you try `**/.part/**` and `**/.pending/**`? Same with `*/._`, try `*/._/*` instead
Author
Owner

@tanpro260196 commented on GitHub (Mar 26, 2025):

Having similar issue, all photos disappear during schedule scan
Image Exclude list
Image

Instead of **/.part and **/.pending, can you try **/.part/** and **/.pending/**?

Same with */._, try */._/* instead

Same thing, a schedule scan wipe all photo from my library.

@tanpro260196 commented on GitHub (Mar 26, 2025): > > Having similar issue, all photos disappear during schedule scan > > ![Image](https://github.com/user-attachments/assets/62fe8c89-d3fa-44fa-ade2-f88ae2b12b86) Exclude list > > ![Image](https://github.com/user-attachments/assets/0aeb6533-f43d-4fec-acbe-cac9057b6c08) > > Instead of `**/.part` and `**/.pending`, can you try `**/.part/**` and `**/.pending/**`? > > Same with `*/._`, try `*/._/*` instead Same thing, a schedule scan wipe all photo from my library.
Author
Owner

@etnoy commented on GitHub (Mar 26, 2025):

Thanks for checking. I have triaged the issue with a problem with multiple import paths, fix incoming

@etnoy commented on GitHub (Mar 26, 2025): Thanks for checking. I have triaged the issue with a problem with multiple import paths, fix incoming
Author
Owner

@dinosmm commented on GitHub (Mar 26, 2025):

Glad you found it @etnoy as it's definitely not exclusion pattern related - I deleted both my exclusion patterns and it's still happening. I do have multiple import paths.

@dinosmm commented on GitHub (Mar 26, 2025): Glad you found it @etnoy as it's definitely not exclusion pattern related - I deleted both my exclusion patterns and it's still happening. I do have multiple import paths.
Author
Owner

@etnoy commented on GitHub (Mar 26, 2025):

It's my own stupid fault for forgetting de Morgans law, haha. The PR is waiting for merge and likely Alex will push a fixed release

@etnoy commented on GitHub (Mar 26, 2025): It's my own stupid fault for forgetting de Morgans law, haha. The PR is waiting for merge and likely Alex will push a fixed release
Author
Owner

@dinosmm commented on GitHub (Mar 26, 2025):

forgetting de Morgans law

I know you are very busy and will totally understand if you don't have time for this, but if you did, I would massively appreciate an explanation as to how de Morgan's came into this. I teach CS in high school, and this could make a great real-life example to give the students some perspective as to how de Morgan's is used in the real world!

@dinosmm commented on GitHub (Mar 26, 2025): > forgetting de Morgans law I know you are very busy and will totally understand if you don't have time for this, but if you did, I would massively appreciate an explanation as to how de Morgan's came into this. I teach CS in high school, and this could make a great real-life example to give the students some perspective as to how de Morgan's is used in the real world!
Author
Owner

@etnoy commented on GitHub (Mar 26, 2025):

forgetting de Morgans law

I know you are very busy and will totally understand if you don't have time for this, but if you did, I would massively appreciate an explanation as to how de Morgan's came into this. I teach CS in high school, and this could make a great real-life example to give the students some perspective as to how de Morgan's is used in the real world!

Sure thing!

I wrote the following line:

eb.or([eb('originalPath', 'not like', paths.join('|')), eb('originalPath', 'like', exclusions.join('|'))]),

The second part compares the path to all exclusion patterns joined together. "Does this match any exclusion pattern?". I then did the same thing for the import paths. Here I changed "like" to "not like", but that was incorrect because it then asks the question "does this exist in all import paths" instead of "does this exist in any import path". In other words, I just inverted the "like" to "not like" but forgot De Morgan and should have changed "all" to "any".

I hope this makes things clear :)

@etnoy commented on GitHub (Mar 26, 2025): > > forgetting de Morgans law > > I know you are very busy and will totally understand if you don't have time for this, but if you did, I would massively appreciate an explanation as to how de Morgan's came into this. I teach CS in high school, and this could make a great real-life example to give the students some perspective as to how de Morgan's is used in the real world! Sure thing! I wrote the following line: `eb.or([eb('originalPath', 'not like', paths.join('|')), eb('originalPath', 'like', exclusions.join('|'))]),` The second part compares the path to all exclusion patterns joined together. "Does this match any exclusion pattern?". I then did the same thing for the import paths. Here I changed "like" to "not like", but that was incorrect because it then asks the question "does this exist in all import paths" instead of "does this exist in any import path". In other words, I just inverted the "like" to "not like" but forgot De Morgan and should have changed "all" to "any". I hope this makes things clear :)
Author
Owner

@dinosmm commented on GitHub (Mar 26, 2025):

Thank you so much, I will use this in my lessons (anonymised of course).

One question that I have though is... why is Immich oscillating between showing my photos and not showing them? It seems to happen on the external library rescan interval. If your query there is wrong, should it not show the photos after every single scan?

@dinosmm commented on GitHub (Mar 26, 2025): Thank you so much, I will use this in my lessons (anonymised of course). One question that I have though is... why is Immich oscillating between showing my photos and not showing them? It seems to happen on the external library rescan interval. If your query there is wrong, should it *not* show the photos after every single scan?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#5679