[BUG] Internal Server Error 500 when searching in Web UI #759

Closed
opened 2026-02-04 22:20:18 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @MSommer95 on GitHub (Mar 21, 2023).

The bug

When searching terms in the web ui a 500 internal server error is being reported.

The server logs:

[Nest] 1  - 03/21/2023, 12:01:20 PM   ERROR [ExceptionsHandler] read ECONNRESET
Error: read ECONNRESET
    at TCP.onStreamRead (node:internal/stream_base_commons:217:20)

P.S.: Is there a parameter I could give my docker containers so that the logging is verbose?

The OS that Immich Server is running on

Docker container

Version of Immich Server

v1.51.1

Version of Immich Mobile App

v1.51.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

immich-server:
    container_name: immich_server
    image: altran1502/immich-server:release
    entrypoint: [ "/bin/sh", "./start-server.sh" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    ports:
      - 3011:3001
      - 9230:9230
    env_file:
      - .env
    environment:
      - NODE_ENV=production
    depends_on:
      - redis
      - database
      - typesense
    restart: unless-stopped

  immich-microservices:
    container_name: immich_microservices
    image: altran1502/immich-server:release
    entrypoint: [ "/bin/sh", "./start-microservices.sh" ]
    ports:
      - 3013:3003
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    environment:
      - NODE_ENV=production
    depends_on:
      - redis
      - database
      - typesense
    restart: unless-stopped

  immich-machine-learning:
    container_name: immich_machine_learning
    image: altran1502/immich-machine-learning:release
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - ./data/immich/model-cache:/cache
    env_file:
      - .env
    environment:
      - NODE_ENV=production
    restart: unless-stopped

  immich-web:
    container_name: immich_web
    image: altran1502/immich-web:release
    entrypoint: [ "/bin/sh", "./entrypoint.sh" ]
    ports:
      - 3010:3000
      - 24678:24678
    env_file:
      - .env
    restart: unless-stopped

  redis:
    container_name: immich_redis
    image: redis:6.2
    restart: unless-stopped
    ports:
      - 5432:5432

  database:
    container_name: immich_postgres
    image: postgres:14
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      PG_DATA: /var/lib/postgresql/data
    volumes:
      - ./data/immich/postgres:/var/lib/postgresql/data
    restart: unless-stopped

  immich-proxy:
    container_name: immich_proxy
    image: altran1502/immich-proxy:release
    environment:
      # Make sure these values get passed through from the env file
      IMMICH_SERVER_URL: ${IMMICH_SERVER_URL}
      IMMICH_WEB_URL: ${IMMICH_WEB_URL}
    ports:
      - 2283:8080
    logging:
      driver: none
    depends_on:
      - immich-server
    restart: unless-stopped

  typesense:
    container_name: immich_typesense
    image: typesense/typesense:0.24.0
    environment:
      - TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
      - TYPESENSE_DATA_DIR=/data
    logging:
      driver: none
    volumes:
      - ./data/immich/typesense:/data

Your .env content

TYPESENSE_API_KEY=*****
REDIS_HOSTNAME=immich_redis
UPLOAD_LOCATION=/homiepool/immich/data
IMMICH_WEB_URL=http://immich.homie.local:3010
IMMICH_SERVER_URL=http://immich.homie.local:3011
IMMICH_MACHINE_LEARNING_URL=http://immich.homie.local:3013

Reproduction steps

Deploy the container and try to search terms through the web ui

Additional information

No response

Originally created by @MSommer95 on GitHub (Mar 21, 2023). ### The bug When searching terms in the web ui a 500 internal server error is being reported. The server logs: ``` [Nest] 1 - 03/21/2023, 12:01:20 PM ERROR [ExceptionsHandler] read ECONNRESET Error: read ECONNRESET at TCP.onStreamRead (node:internal/stream_base_commons:217:20) ``` P.S.: Is there a parameter I could give my docker containers so that the logging is verbose? ### The OS that Immich Server is running on Docker container ### Version of Immich Server v1.51.1 ### Version of Immich Mobile App v1.51.0 ### Platform with the issue - [X] Server - [X] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML immich-server: container_name: immich_server image: altran1502/immich-server:release entrypoint: [ "/bin/sh", "./start-server.sh" ] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload ports: - 3011:3001 - 9230:9230 env_file: - .env environment: - NODE_ENV=production depends_on: - redis - database - typesense restart: unless-stopped immich-microservices: container_name: immich_microservices image: altran1502/immich-server:release entrypoint: [ "/bin/sh", "./start-microservices.sh" ] ports: - 3013:3003 volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - .env environment: - NODE_ENV=production depends_on: - redis - database - typesense restart: unless-stopped immich-machine-learning: container_name: immich_machine_learning image: altran1502/immich-machine-learning:release volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - ./data/immich/model-cache:/cache env_file: - .env environment: - NODE_ENV=production restart: unless-stopped immich-web: container_name: immich_web image: altran1502/immich-web:release entrypoint: [ "/bin/sh", "./entrypoint.sh" ] ports: - 3010:3000 - 24678:24678 env_file: - .env restart: unless-stopped redis: container_name: immich_redis image: redis:6.2 restart: unless-stopped ports: - 5432:5432 database: container_name: immich_postgres image: postgres:14 env_file: - .env environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} PG_DATA: /var/lib/postgresql/data volumes: - ./data/immich/postgres:/var/lib/postgresql/data restart: unless-stopped immich-proxy: container_name: immich_proxy image: altran1502/immich-proxy:release environment: # Make sure these values get passed through from the env file IMMICH_SERVER_URL: ${IMMICH_SERVER_URL} IMMICH_WEB_URL: ${IMMICH_WEB_URL} ports: - 2283:8080 logging: driver: none depends_on: - immich-server restart: unless-stopped typesense: container_name: immich_typesense image: typesense/typesense:0.24.0 environment: - TYPESENSE_API_KEY=${TYPESENSE_API_KEY} - TYPESENSE_DATA_DIR=/data logging: driver: none volumes: - ./data/immich/typesense:/data ``` ### Your .env content ```Shell TYPESENSE_API_KEY=***** REDIS_HOSTNAME=immich_redis UPLOAD_LOCATION=/homiepool/immich/data IMMICH_WEB_URL=http://immich.homie.local:3010 IMMICH_SERVER_URL=http://immich.homie.local:3011 IMMICH_MACHINE_LEARNING_URL=http://immich.homie.local:3013 ``` ### Reproduction steps ```bash Deploy the container and try to search terms through the web ui ``` ### Additional information _No response_
Author
Owner

@alextran1502 commented on GitHub (Mar 21, 2023):

Hello, you will have to run the "CLIP encoding" job first and let it finish before able to search

@alextran1502 commented on GitHub (Mar 21, 2023): Hello, you will have to run the "CLIP encoding" job first and let it finish before able to search
Author
Owner

@MSommer95 commented on GitHub (Mar 21, 2023):

Hey, I did let the CLIP encoding job run two times now and I am still getting the error.

@MSommer95 commented on GitHub (Mar 21, 2023): Hey, I did let the `CLIP encoding job` run two times now and I am still getting the error.
Author
Owner

@alextran1502 commented on GitHub (Mar 21, 2023):

Can you add LOG_LEVEL=verbose to your .env file then restart all containers and try again. Then help us capture the log

@alextran1502 commented on GitHub (Mar 21, 2023): Can you add LOG_LEVEL=verbose to your .env file then restart all containers and try again. Then help us capture the log
Author
Owner

@MSommer95 commented on GitHub (Mar 21, 2023):

I think the problem was with my docker-compose file, because I accidentally swapped the port configuration of the machine-learning container with the microservice one. I can now see that smth is happening when I start an Encode Clip job:

[Nest] 1  - 03/21/2023, 1:03:31 PM   ERROR [SmartInfoService] Unable run clip encoding pipeline: 0d4ec5fa-a06f-4da5-b801-a65f09cb2baa
QueryFailedError: numeric field overflow
    at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async InsertQueryBuilder.execute (/usr/src/app/node_modules/typeorm/query-builder/InsertQueryBuilder.js:106:33)
    at async SmartInfoRepository.upsert (/usr/src/app/dist/apps/microservices/libs/infra/src/db/repository/smart-info.repository.js:25:9)
    at async SmartInfoService.handleEncodeClip (/usr/src/app/dist/apps/microservices/libs/domain/src/smart-info/smart-info.service.js:97:13)
    at async ClipEncodingProcessor.onEncodeClip (/usr/src/app/dist/apps/microservices/apps/microservices/src/processors.js:112:9)
[Nest] 1  - 03/21/2023, 1:03:32 PM   DEBUG [SearchService] Flushing 77 asset upserts
[Nest] 1  - 03/21/2023, 1:03:37 PM   DEBUG [SearchService] Flushing 83 asset upserts
@MSommer95 commented on GitHub (Mar 21, 2023): I think the problem was with my ``docker-compose`` file, because I accidentally swapped the port configuration of the ``machine-learning`` container with the ``microservice`` one. I can now see that smth is happening when I start an Encode Clip job: ``` [Nest] 1 - 03/21/2023, 1:03:31 PM ERROR [SmartInfoService] Unable run clip encoding pipeline: 0d4ec5fa-a06f-4da5-b801-a65f09cb2baa QueryFailedError: numeric field overflow at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19) at runMicrotasks (<anonymous>) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async InsertQueryBuilder.execute (/usr/src/app/node_modules/typeorm/query-builder/InsertQueryBuilder.js:106:33) at async SmartInfoRepository.upsert (/usr/src/app/dist/apps/microservices/libs/infra/src/db/repository/smart-info.repository.js:25:9) at async SmartInfoService.handleEncodeClip (/usr/src/app/dist/apps/microservices/libs/domain/src/smart-info/smart-info.service.js:97:13) at async ClipEncodingProcessor.onEncodeClip (/usr/src/app/dist/apps/microservices/apps/microservices/src/processors.js:112:9) [Nest] 1 - 03/21/2023, 1:03:32 PM DEBUG [SearchService] Flushing 77 asset upserts [Nest] 1 - 03/21/2023, 1:03:37 PM DEBUG [SearchService] Flushing 83 asset upserts ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#759