[BUG] <immich_microservices always running with high cpu use> #1490

Closed
opened 2026-02-05 02:04:06 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @vieri262 on GitHub (Oct 21, 2023).

The bug

immich_microservice erro :JavaScript heap out of memory

The OS that Immich Server is running on

ubuntu

Version of Immich Server

v1.82.1

Version of Immich Mobile App

v1.82.1

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:release
    command: [ "start.sh", "immich" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - x:\xx:/path/to/media/family
    env_file:
      - .env
    depends_on:
      - redis
      - database
      - typesense
    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:release
    #extends:
       #file: hwaccel.yml
       #service: hwaccel
    command: [ "start.sh", "microservices" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - X:\xx:/path/to/media/famliy      
    env_file:
      - .env
    depends_on:
      - redis
      - database
      - typesense
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:release
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always

  immich-web:
    container_name: immich_web
    image: ghcr.io/immich-app/immich-web:release
    env_file:
      - .env
    restart: always

  typesense:
    container_name: immich_typesense
    image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd
    environment:
      - TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
      - TYPESENSE_DATA_DIR=/data
      # remove this to get debug messages
      - GLOG_minloglevel=1
    volumes:
      - tsdata:/data
    restart: always

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

  database:
    container_name: immich_postgres
    image: postgres:14-alpine@sha256:28407a9961e76f2d285dc6991e8e48893503cc3836a4755bbc2d40bcc272a441
    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

  immich-proxy:
    container_name: immich_proxy
    image: ghcr.io/immich-app/immich-proxy:release
    environment:
      # Make sure these values get passed through from the env file
      - IMMICH_SERVER_URL
      - IMMICH_WEB_URL
    ports:
      - 2283:8080
    depends_on:
      - immich-server
      - immich-web
    restart: always

volumes:
  pgdata:
  model-cache:
  tsdata:

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=C:\docker\immchapp\

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

# Connection secrets for postgres and typesense. You should change these to random passwords
TYPESENSE_API_KEY=some-random-text
DB_PASSWORD=postgres

# 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.after the service running, immich_microservice will running with a high cpu usage.
2.ther have no jobs in jobs status
3.EXTRACT METADATA status is pause.
4.cilck repair button in webui, notice "Internal Error (undefined)"

Additional information

2023-10-21 12:22:22 [Nest] 6 - 10/21/2023, 4:22:22 AM LOG [NestFactory] Starting Nest application...
2023-10-21 12:22:22 [Nest] 6 - 10/21/2023, 4:22:22 AM LOG [InstanceLoader] TypeOrmModule dependencies initialized +241ms
2023-10-21 12:22:22 [Nest] 6 - 10/21/2023, 4:22:22 AM LOG [InstanceLoader] BullModule dependencies initialized +0ms
2023-10-21 12:22:22 [Nest] 6 - 10/21/2023, 4:22:22 AM LOG [InstanceLoader] ConfigHostModule dependencies initialized +1ms
2023-10-21 12:22:22 [Nest] 6 - 10/21/2023, 4:22:22 AM LOG [InstanceLoader] DiscoveryModule dependencies initialized +1ms
2023-10-21 12:22:22 [Nest] 6 - 10/21/2023, 4:22:22 AM LOG [InstanceLoader] ConfigModule dependencies initialized +11ms
2023-10-21 12:22:22 [Nest] 6 - 10/21/2023, 4:22:22 AM LOG [InstanceLoader] BullModule dependencies initialized +0ms
2023-10-21 12:22:22 [Nest] 6 - 10/21/2023, 4:22:22 AM LOG [InstanceLoader] BullModule dependencies initialized +0ms
2023-10-21 12:22:23 [Nest] 6 - 10/21/2023, 4:22:23 AM LOG [InstanceLoader] TypeOrmCoreModule dependencies initialized +863ms
2023-10-21 12:22:23 [Nest] 6 - 10/21/2023, 4:22:23 AM LOG [InstanceLoader] TypeOrmModule dependencies initialized +1ms
2023-10-21 12:22:23 [Nest] 6 - 10/21/2023, 4:22:23 AM LOG [InstanceLoader] InfraModule dependencies initialized +3ms
2023-10-21 12:22:23 [Nest] 6 - 10/21/2023, 4:22:23 AM LOG [InstanceLoader] DomainModule dependencies initialized +29ms
2023-10-21 12:22:23 [Nest] 6 - 10/21/2023, 4:22:23 AM LOG [InstanceLoader] MicroservicesModule dependencies initialized +1ms
2023-10-21 11:46:58
2023-10-21 11:46:58 <--- Last few GCs --->
2023-10-21 11:46:58
2023-10-21 11:46:58 [7:0x5d6e6310000] 176158 ms: Scavenge 1950.7 (1995.0) -> 1947.8 (1995.5) MB, 14.30 / 0.00 ms (average mu = 0.328, current mu = 0.311) allocation failure;
2023-10-21 11:46:58 [7:0x5d6e6310000] 176228 ms: Scavenge 1951.7 (1996.0) -> 1948.7 (1996.5) MB, 13.50 / 0.00 ms (average mu = 0.328, current mu = 0.311) allocation failure;
2023-10-21 11:46:58 [7:0x5d6e6310000] 176282 ms: Scavenge 1952.4 (1996.7) -> 1949.4 (2005.2) MB, 5.36 / 0.00 ms (average mu = 0.328, current mu = 0.311) allocation failure;
2023-10-21 11:46:58
2023-10-21 11:46:58
2023-10-21 11:46:58 <--- JS stacktrace --->
2023-10-21 11:46:58
2023-10-21 11:46:58 FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
2023-10-21 11:46:58 1: 0xc99960 node::Abort() [immich_microservices]
2023-10-21 11:46:58 2: 0xb6ffcb [immich_microservices]
2023-10-21 11:46:58 3: 0xebe910 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [immich_microservices]
2023-10-21 11:46:58 4: 0xebebf7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [immich_microservices]
2023-10-21 11:46:58 5: 0x10d06a5 [immich_microservices]
2023-10-21 11:46:58 6: 0x10d0c34 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [immich_microservices]
2023-10-21 11:46:58 7: 0x10e7b24 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*) [immich_microservices]
2023-10-21 11:46:58 8: 0x10e833c v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [immich_microservices]
2023-10-21 11:46:58 9: 0x10ea49a v8::internal::Heap::HandleGCRequest() [immich_microservices]
2023-10-21 11:46:58 10: 0x1055907 v8::internal::StackGuard::HandleInterrupts() [immich_microservices]
2023-10-21 11:46:58 11: 0x14f7322 v8::internal::Runtime_StackGuardWithGap(int, unsigned long*, v8::internal::Isolate*) [immich_microservices]
2023-10-21 11:46:58 12: 0x1931ef6 [immich_microservices]

### Tasks
Originally created by @vieri262 on GitHub (Oct 21, 2023). ### The bug immich_microservice erro :JavaScript heap out of memory ### The OS that Immich Server is running on ubuntu ### Version of Immich Server v1.82.1 ### Version of Immich Mobile App v1.82.1 ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML version: "3.8" services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:release command: [ "start.sh", "immich" ] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - x:\xx:/path/to/media/family env_file: - .env depends_on: - redis - database - typesense restart: always immich-microservices: container_name: immich_microservices image: ghcr.io/immich-app/immich-server:release #extends: #file: hwaccel.yml #service: hwaccel command: [ "start.sh", "microservices" ] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - X:\xx:/path/to/media/famliy env_file: - .env depends_on: - redis - database - typesense restart: always immich-machine-learning: container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:release volumes: - model-cache:/cache env_file: - .env restart: always immich-web: container_name: immich_web image: ghcr.io/immich-app/immich-web:release env_file: - .env restart: always typesense: container_name: immich_typesense image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd environment: - TYPESENSE_API_KEY=${TYPESENSE_API_KEY} - TYPESENSE_DATA_DIR=/data # remove this to get debug messages - GLOG_minloglevel=1 volumes: - tsdata:/data restart: always redis: container_name: immich_redis image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3 restart: always database: container_name: immich_postgres image: postgres:14-alpine@sha256:28407a9961e76f2d285dc6991e8e48893503cc3836a4755bbc2d40bcc272a441 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 immich-proxy: container_name: immich_proxy image: ghcr.io/immich-app/immich-proxy:release environment: # Make sure these values get passed through from the env file - IMMICH_SERVER_URL - IMMICH_WEB_URL ports: - 2283:8080 depends_on: - immich-server - immich-web restart: always volumes: pgdata: model-cache: tsdata: ``` ### 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=C:\docker\immchapp\ # The Immich version to use. You can pin this to a specific version like "v1.71.0" IMMICH_VERSION=release # Connection secrets for postgres and typesense. You should change these to random passwords TYPESENSE_API_KEY=some-random-text DB_PASSWORD=postgres # 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 ```bash 1.after the service running, immich_microservice will running with a high cpu usage. 2.ther have no jobs in jobs status 3.EXTRACT METADATA status is pause. 4.cilck repair button in webui, notice "Internal Error (undefined)" ``` ### Additional information 2023-10-21 12:22:22 [Nest] 6 - 10/21/2023, 4:22:22 AM LOG [NestFactory] Starting Nest application... 2023-10-21 12:22:22 [Nest] 6 - 10/21/2023, 4:22:22 AM LOG [InstanceLoader] TypeOrmModule dependencies initialized +241ms 2023-10-21 12:22:22 [Nest] 6 - 10/21/2023, 4:22:22 AM LOG [InstanceLoader] BullModule dependencies initialized +0ms 2023-10-21 12:22:22 [Nest] 6 - 10/21/2023, 4:22:22 AM LOG [InstanceLoader] ConfigHostModule dependencies initialized +1ms 2023-10-21 12:22:22 [Nest] 6 - 10/21/2023, 4:22:22 AM LOG [InstanceLoader] DiscoveryModule dependencies initialized +1ms 2023-10-21 12:22:22 [Nest] 6 - 10/21/2023, 4:22:22 AM LOG [InstanceLoader] ConfigModule dependencies initialized +11ms 2023-10-21 12:22:22 [Nest] 6 - 10/21/2023, 4:22:22 AM LOG [InstanceLoader] BullModule dependencies initialized +0ms 2023-10-21 12:22:22 [Nest] 6 - 10/21/2023, 4:22:22 AM LOG [InstanceLoader] BullModule dependencies initialized +0ms 2023-10-21 12:22:23 [Nest] 6 - 10/21/2023, 4:22:23 AM LOG [InstanceLoader] TypeOrmCoreModule dependencies initialized +863ms 2023-10-21 12:22:23 [Nest] 6 - 10/21/2023, 4:22:23 AM LOG [InstanceLoader] TypeOrmModule dependencies initialized +1ms 2023-10-21 12:22:23 [Nest] 6 - 10/21/2023, 4:22:23 AM LOG [InstanceLoader] InfraModule dependencies initialized +3ms 2023-10-21 12:22:23 [Nest] 6 - 10/21/2023, 4:22:23 AM LOG [InstanceLoader] DomainModule dependencies initialized +29ms 2023-10-21 12:22:23 [Nest] 6 - 10/21/2023, 4:22:23 AM LOG [InstanceLoader] MicroservicesModule dependencies initialized +1ms 2023-10-21 11:46:58 2023-10-21 11:46:58 <--- Last few GCs ---> 2023-10-21 11:46:58 2023-10-21 11:46:58 [7:0x5d6e6310000] 176158 ms: Scavenge 1950.7 (1995.0) -> 1947.8 (1995.5) MB, 14.30 / 0.00 ms (average mu = 0.328, current mu = 0.311) allocation failure; 2023-10-21 11:46:58 [7:0x5d6e6310000] 176228 ms: Scavenge 1951.7 (1996.0) -> 1948.7 (1996.5) MB, 13.50 / 0.00 ms (average mu = 0.328, current mu = 0.311) allocation failure; 2023-10-21 11:46:58 [7:0x5d6e6310000] 176282 ms: Scavenge 1952.4 (1996.7) -> 1949.4 (2005.2) MB, 5.36 / 0.00 ms (average mu = 0.328, current mu = 0.311) allocation failure; 2023-10-21 11:46:58 2023-10-21 11:46:58 2023-10-21 11:46:58 <--- JS stacktrace ---> 2023-10-21 11:46:58 2023-10-21 11:46:58 FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 2023-10-21 11:46:58 1: 0xc99960 node::Abort() [immich_microservices] 2023-10-21 11:46:58 2: 0xb6ffcb [immich_microservices] 2023-10-21 11:46:58 3: 0xebe910 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [immich_microservices] 2023-10-21 11:46:58 4: 0xebebf7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [immich_microservices] 2023-10-21 11:46:58 5: 0x10d06a5 [immich_microservices] 2023-10-21 11:46:58 6: 0x10d0c34 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [immich_microservices] 2023-10-21 11:46:58 7: 0x10e7b24 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*) [immich_microservices] 2023-10-21 11:46:58 8: 0x10e833c v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [immich_microservices] 2023-10-21 11:46:58 9: 0x10ea49a v8::internal::Heap::HandleGCRequest() [immich_microservices] 2023-10-21 11:46:58 10: 0x1055907 v8::internal::StackGuard::HandleInterrupts() [immich_microservices] 2023-10-21 11:46:58 11: 0x14f7322 v8::internal::Runtime_StackGuardWithGap(int, unsigned long*, v8::internal::Isolate*) [immich_microservices] 2023-10-21 11:46:58 12: 0x1931ef6 [immich_microservices] ```[tasklist] ### Tasks ```
Author
Owner

@jrasm91 commented on GitHub (Oct 24, 2023):

Closing as a duplicate of #4530.

@jrasm91 commented on GitHub (Oct 24, 2023): Closing as a duplicate of #4530.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1490