#31571·immich

Immich logs reports memory leak while syncing with mobile app

Author: kylo32Created Sep 15, 2026Updated Sep 28, 2026

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

  • Yes

The bug

The issue seems to be similar to #31415 but seems not the same. When syncing Android Mobile App i see in immich server logs entries like this: (node:25) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added to [Gzip]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit More logs attached.

The OS that Immich Server is running on

Ubuntu 26.04.01 LTS

Version of Immich Server

3.2.1

Version of Immich Mobile App

3.2.0

Platform with the issue

  • Server
  • Web
  • Mobile

Device make and model

Galaxy S21 Android 15 and others

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: vaapi # 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_LOCATION in the .env file
      - ${UPLOAD_LOCATION}:/data
      - /etc/localtime:/etc/localtime:ro
      - ${THUMB_LOCATION}:/data/thumbs
      - ${ENCODED_VIDEO_LOCATION}:/data/encoded-video
      - ${PROFILE_LOCATION}:/data/profile
      - ${BACKUP_LOCATION}:/data/backups
    env_file:
      - .env
    ports:
      - '2283:2283'
    depends_on:
      - redis
      - database
    networks:
      - default
      - swag_net
    restart: always
    healthcheck:
      disable: false

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

  redis:
    container_name: immich_redis
    image: docker.io/valkey/valkey:9@sha256:4963247afc4cd33c7d3b2d2816b9f7f8eeebab148d29056c2ca4d7cbc966f2d9
    healthcheck:
      test: redis-cli ping | grep -q PONG || exit 1
    restart: always

  database:
    container_name: immich_postgres
    image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
      # Uncomment the DB_STORAGE_TYPE: 'HDD' var if your database isn't stored on SSDs
      # DB_STORAGE_TYPE: 'HDD'
    volumes:
      # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    shm_size: 128mb
    restart: always
    healthcheck:
      disable: false

volumes:
  model-cache:

networks:
  swag_net:
    external: true

Your .env content

bash
# 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=./library
UPLOAD_LOCATION=/mnt/d/immich/immich_files
THUMB_LOCATION=./library/thumbs
ENCODED_VIDEO_LOCATION=./library/encoded-video
PROFILE_LOCATION=./library/profile
BACKUP_LOCATION=/mnt/d/immich/backups


# 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=Europe/Warsaw

# The Immich version to use. You can pin this to a specific version like "v2.1.0"
IMMICH_VERSION=v3

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

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

###################################################################################

Reproduction steps

  1. Open mobile app to sync data after a longer time without no sync (f.ex 2 days)
  2. Wait a few moments
  3. Check the logs of immich server

Relevant log output

bash
[Nest] 25  - 09/14/2026, 8:53:21 PM     LOG [Api:NestApplication] Nest application successfully started
[Nest] 25  - 09/14/2026, 8:53:21 PM     LOG [Api:Bootstrap] Immich Server is listening on http://[::1]:2283 [v3.2.1] [production]
[Nest] 25  - 09/14/2026, 8:53:21 PM     LOG [Api:MachineLearningRepository] Machine learning server became healthy (http://immich-machine-learning:3003).
[Nest] 25  - 09/14/2026, 8:59:08 PM     LOG [Api:WebsocketRepository] Websocket Connect:    hrdDyr-FPUpRwoPOAAAB
[Nest] 25  - 09/14/2026, 8:59:25 PM     LOG [Api:WebsocketRepository] Websocket Disconnect: hrdDyr-FPUpRwoPOAAAB
[Nest] 25  - 09/14/2026, 8:59:26 PM     LOG [Api:WebsocketRepository] Websocket Connect:    1g3KVzrAsIlQvR7pAAAD
[Nest] 25  - 09/14/2026, 9:00:01 PM     LOG [Api:WebsocketRepository] Websocket Disconnect: 1g3KVzrAsIlQvR7pAAAD
[Nest] 25  - 09/14/2026, 9:00:23 PM     LOG [Api:WebsocketRepository] Websocket Connect:    62mfpHOK4B0EpLH4AAAF
[Nest] 25  - 09/14/2026, 9:00:36 PM     LOG [Api:WebsocketRepository] Websocket Disconnect: 62mfpHOK4B0EpLH4AAAF
[Nest] 25  - 09/14/2026, 9:17:14 PM     LOG [Api:WebsocketRepository] Websocket Connect:    DRrFdH2VLEMwi9UOAAAH
[Nest] 25  - 09/14/2026, 9:17:28 PM     LOG [Api:WebsocketRepository] Websocket Disconnect: DRrFdH2VLEMwi9UOAAAH
[Nest] 25  - 09/14/2026, 9:19:02 PM     LOG [Api:WebsocketRepository] Websocket Connect:    MgyM3D2IzTYTDEUIAAAJ
(node:25) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added to [Gzip]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit
[Nest] 25  - 09/14/2026, 9:20:02 PM     LOG [Api:WebsocketRepository] Websocket Disconnect: MgyM3D2IzTYTDEUIAAAJ
[Nest] 25  - 09/14/2026, 9:20:20 PM     LOG [Api:WebsocketRepository] Websocket Connect:    SQwkRqV-SZT7g4jGAAAL
(node:25) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added to [Gzip]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit
[Nest] 25  - 09/14/2026, 9:22:04 PM     LOG [Api:WebsocketRepository] Websocket Connect:    oWGeEMfwxmAJsitkAAAN
[Nest] 25  - 09/14/2026, 9:22:04 PM     LOG [Api:WebsocketRepository] Websocket Disconnect: SQwkRqV-SZT7g4jGAAAL
(node:25) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added to [Gzip]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit
[Nest] 25  - 09/14/2026, 9:23:14 PM     LOG [Api:WebsocketRepository] Websocket Disconnect: oWGeEMfwxmAJsitkAAAN
[Nest] 25  - 09/14/2026, 9:23:28 PM     LOG [Api:WebsocketRepository] Websocket Connect:    3o_xmNMJS-WAcnANAAAP
[Nest] 25  - 09/14/2026, 9:23:28 PM     LOG [Api:WebsocketRepository] Websocket Disconnect: 3o_xmNMJS-WAcnANAAAP

Additional information

Issue is not always reproducible. When I trigger syncing of the app every morning I do not see mentioned in ticket logs.