immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
51.69k stars 2.74k forks source link

Immich server 1.95.0 was broken #7288

Closed ydrob closed 8 months ago

ydrob commented 8 months ago

The bug

After update 1.9.5 Immich server was broken, immich server container stops after running. Immich server complains about files in folder @eadir, but this folders are excluded and all works on 1.94.1 version. image image If I comment mourning external library it starts. immich_server.csv All works on 1.94.1 version

Logs are attached.

The OS that Immich Server is running on

synology dsm 7.2.1 u4

Version of Immich Server

v1.9.5

Version of Immich Mobile App

v1.9.5

Platform with the issue

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_server
    image: ghcr.io/immich-app/immich-server:v1.95.1
    user: 1026:100
    security_opt:
      - no-new-privileges:true
    command: [ "start.sh", "immich" ]
    volumes:
      - /volume1/docker/immich/upload:/usr/src/app/upload
      - /volume1/storage/Photo:/mnt/media/Photo:ro
      - /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:v1.95.1
    user: 1026:100
    security_opt:
      - no-new-privileges:true
    # extends:
    #   file: hwaccel.yml
    #   service: hwaccel
    command: [ "start.sh", "microservices" ]
    volumes:
      - /volume1/docker/immich/upload:/usr/src/app/upload
      - /volume1/storage/Photo:/mnt/media/Photo:ro
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    depends_on:
      - redis
      - database
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:v1.95.1
    user: 1026:100
    security_opt:
      - no-new-privileges:true
    volumes:
      - ./model-cache:/cache
    env_file:
      - .env
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:b6124ab2e45cc332e16398022a411d7e37181f21ff7874835e0180f56a09e82a
    restart: always

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

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=/volume1/docker/test_immich/upload

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

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

# 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.Update yaml to use version 1.9.5
2.Run project

Additional information

No response

bo0tzz commented 8 months ago

@etnoy does the file watcher respect exclusions?

etnoy commented 8 months ago

@etnoy does the file watcher respect exclusions?

It should, but I realize we never added tests for that. I will have to investigate.

Thanks for the report!

sleep4at commented 8 months ago

same issue

etnoy commented 8 months ago

There were some watcher refactors in 1.95

etnoy commented 8 months ago

OK. I just confirmed that exclusion patterns do work with file watchers, and this has not been changed in the latest version. However, due to some technicalities Immich still needs to watch all files, and exclusion patterns are filtered in a later steps.

The core issue you are having is that the number of file watchers is limited by your operating system. The fix is to increase this limit, as documented here: https://watchexec.github.io/docs/inotify-limits.html

joe-cole1 commented 8 months ago

For those on Synology (I'm on a ds 920+, DSM 7.2.1) this worked for me: https://github.com/immich-app/immich/issues/7303#issuecomment-1958043509