Skip to content

Out of Memory Issue #615

@Jake-Chae

Description

@Jake-Chae

Hello,
I am using a single Jigasi instance to provide STT (speech-to-text) service for audio streams coming from a total of 6 different servers.
The deployment is Docker-based, and both the Jigasi container and the STT server container are currently configured with a memory limit of 16 GiB.
However, during usage we are seeing the following error logs, after which the Jigasi server stops:

2025-11-11 08:57:07.070 INFO: [308] [ctx=1762818438257966354320 room=kdt-design-7th_bfbhcp@muc.liveroom.likelion.net] Participant.createStreamingSessionWithRetry#649: STT connection successfully created for participant 5d6236cb after 1 attempt(s)2025-11-11 08:57:10.197 INFO: [273] net.java.sip.communicator.impl.protocol.jabber.ChatRoomJabberImpl$MemberListener.joined: kdt-backendj-19th_qhwzp8@muc.liveroom.likelion.net/67af1f35 has joined the kdt-backendj-19th_qhwzp8@muc.liveroom.likelion.net chat room.[1066.285s][warning][os,thread] Failed to start thread "Unknown thread" - pthread_create failed (EAGAIN) for attributes: stacksize: 256k, guardsize: 0k, detached.[1066.286s][warning][os,thread] Failed to start the native thread for java.lang.Thread "WebSocket@1015685120-8400"[1066.286s][warning][os,thread] Failed to start thread "Unknown thread" - pthread_create failed (EAGAIN) for attributes: stacksize: 256k, guardsize: 0k, detached.[1066.287s][warning][os,thread] Failed to start the native thread for java.lang.Thread "pool-18-thread-2"2025-11-11 08:57:10.910 SEVERE: [520] net.java.sip.communicator.util.UtilActivator.uncaughtException: An uncaught exception occurred in thread=Thread[pool-18-thread-1,5,main], and message was: unable to create native thread: possibly out of memory or process/resource limits reachedjava.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached at java.base/java.lang.Thread.start0(Native Method) at java.base/java.lang.Thread.start(Thread.java:809) at java.base/java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:945) at java.base/java.util.concurrent.ThreadPoolExecutor.processWorkerExit(ThreadPoolExecutor.java:1013) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1150) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:840)[1066.783s][warning][os,thread] Failed to start thread "Unknown thread" - pthread_create failed (EAGAIN) for attributes: stacksize: 256k, guardsize: 0k, detached.[1066.783s][warning][os,thread] Failed to start the native thread for java.lang.Thread "WebSocket@1828296879-8403"[1066.783s][warning][os,thread] Failed to start thread "Unknown thread" - pthread_create failed (EAGAIN) for attributes: stacksize: 256k, guardsize: 0k, detached.
From what I understand, this looks like OutOfMemoryError: unable to create native thread, where the JVM is no longer able to create new native threads (either due to memory exhaustion or process/thread limits).
Below is an excerpt from my current docker-compose.yml for Jigasi:

      - GC_CLIENT_EMAIL
      - GC_CLIENT_ID
      - GC_CLIENT_CERT_URL
      - SHUTDOWN_REST_ENABLED
      - SENTRY_DSN="${JIGASI_SENTRY_DSN:-0}"
      - SENTRY_ENVIRONMENT
      - SENTRY_RELEASE
      - TZ
      - JIGASI_MAX_MEMORY=1024m
      - JAVA_TOOL_OPTIONS=-Xss256k

    pids_limit: 8192
    ulimits:
      nproc: 65535
      nofile:
        soft: 65535
        hard: 65535
    mem_limit: 2g

    networks:
      meet.jitsi:

networks:
  meet.jitsi:
    external: true

The following part:

- JIGASI_MAX_MEMORY=1024m
- JAVA_TOOL_OPTIONS=-Xss256k

    pids_limit: 8192
    ulimits:
      nproc: 65535
      nofile:
        soft: 65535
        hard: 65535
    mem_limit: 2g

was added based on advice I received from GPT when I asked about the error logs.
I would greatly appreciate it if you could share any guidance or best practices related to:
Whether these settings (JIGASI_MAX_MEMORY, JAVA_TOOL_OPTIONS, pids_limit, ulimits, mem_limit) look reasonable for a single Jigasi instance handling STT for 6 servers.
Whether this unable to create native thread error is a known issue or pattern with Jigasi in high-load STT scenarios.
Any recommended configuration or tuning (JVM options, Docker limits, or Jigasi-specific settings) to avoid this type of failure.
Thank you very much for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions