immich-app / immich

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

invalid configuration parameter name "vectors.enable_prefilter" #14234

Closed jmnovak50 closed 2 days ago

jmnovak50 commented 2 days ago

The bug

Running into this issue when pointing to an external Postgres DB with vector 0.3.0 and when running face recognition. Face detection seems to work properly

[Nest] 7 - 11/19/2024, 12:18:50 PM ERROR [Microservices:JobService] Unable to run job handler (facialRecognition/facial-recognition): QueryFailedError: invalid configuration parameter name "vectors.enable_prefilter"

[Nest] 7 - 11/19/2024, 12:18:50 PM ERROR [Microservices:JobService] QueryFailedError: invalid configuration parameter name "vectors.enable_prefilter"

at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19)

at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

at async DataSource.query (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:350:20)

at async /usr/src/app/dist/repositories/search.repository.js:153:13

at async EntityManager.transaction (/usr/src/app/node_modules/typeorm/entity-manager/EntityManager.js:73:28)

at async SearchRepository.searchFaces (/usr/src/app/dist/repositories/search.repository.js:137:9)

at async PersonService.handleRecognizeFaces (/usr/src/app/dist/services/person.service.js:350:25)

at async JobService.onJobStart (/usr/src/app/dist/services/job.service.js:151:28)

at async EventRepository.onEvent (/usr/src/app/dist/repositories/event.repository.js:122:13)

at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)

[Nest] 7 - 11/19/2024, 12:18:50 PM ERROR [Microservices:JobService] Object:

{

"id": "3ab9ef83-3bd9-41ee-a59f-091452b28303",

"deferred": false

}

Im using the following configuration:

Pointing to a external postgres db with vector extension Using docker compose to bring up Machine Learning, server and redis.

The OS that Immich Server is running on

TrueNaS-ElectricEel-24.10.0.2

Version of Immich Server

1.120.2

Version of Immich Mobile App

N/A

Platform with the issue

Your docker-compose.yml content

name: immich
services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload/Volumes/jmnovak-1/projects/immich/docker-compose.yml
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - /mnt/p2/ops/immich/.env
    ports:
      - '2283:2283'
    depends_on:
      - redis
    restart: always
    healthcheck:
      disable: false

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - /mnt/p2/ops/immich/.env
    restart: always
    healthcheck:
      disable: false

  redis:
    container_name: immich_redis
    image: docker.io/redis:6.2-alpine@sha256:2ba50e1ac3a0ea17b736ce9db2b0a9f6f8b85d4c27d5f5accc6a416d8f42c6d5
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always

volumes:
  model-cache:
  /mnt/p2/photo/originals: /usr/src/app/external

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=/mnt/p2/ops/immich
# 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/wiki/List_of_tz_database_time_zones#List
TZ=America/Chicago

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

# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=XXXX
DB_DATABASE_NAME=immich
DB_HOSTNAME: XXXXXX
DB_PORT: 5432

Reproduction steps

1.Run Facial Detection. 2.Note errors in immich server. 3.Verify errors exist in postgres log ...

Relevant log output

No response

Additional information

Note pgvecto.rs, in v 0.3.0 has removed prefilering https://github.com/tensorchord/pgvecto.rs/releases/tag/v0.3.0

Also, note this is done through custom YAML and not through standard TrueNAS applications.