Skip to content

Unable to create native thread: possibly out of memory or process/resource limits reached #141

@ValiDrv

Description

@ValiDrv

Hello

Is there a way to debug this error message?

> docker run -p 8080:8080 ghcr.io/observabilitystack/geoip-api:latest
java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached
    at com.oracle.svm.core.thread.PlatformThreads.startThread(PlatformThreads.java:741)
    at java.lang.Thread.start0(Thread.java:386)
    at java.lang.Thread.start(Thread.java:802)
    at com.oracle.svm.core.heap.ReferenceHandlerThread.start(ReferenceHandlerThread.java:54)
    at com.oracle.svm.core.graal.snippets.CEntryPointSnippets.initializeIsolate(CEntryPointSnippets.java:292)
    at com.oracle.svm.core.JavaMainWrapper$EnterCreateIsolateWithCArgumentsPrologue.enter(JavaMainWrapper.java:383)

I get this on some (not all) servers, and they pretty powerful 20 core / 256gb ram servers, with identical hardware/os settings.

> ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 768246
max locked memory       (kbytes, -l) 16384
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 768246
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
> docker run --rm debian sh -c "ulimit -a"
time(seconds)        unlimited
file(blocks)         unlimited
data(kbytes)         unlimited
stack(kbytes)        8192
coredump(blocks)     unlimited
memory(kbytes)       unlimited
locked memory(kbytes) 16384
process              unlimited
nofiles              1048576
vmemory(kbytes)      unlimited
locks                unlimited
rtprio               0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions