Score:0

Unable to create native thread, Pterodactyl Panel, Minecraft servers

in flag

Linux panel 5.4.0-80-generic #90-Ubuntu SMP Fri Jul 9 22:49:44 UTC 2021 x86_64 x 86_64 x86_64 GNU/Linux

So I run minecraft servers using the pterodactyl panel on a ubuntu linux server. server has 8 cores 16 threads. I use aikars flags for my jvm arguments -pretouch ex:

java -Xms10G -Xmx10G -XX:+UseG1GC -XX:+ParallelRefProcEnabled - 
XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions - 
XX:+DisableExplicitGC -XX:G1NewSizePercent=30 - 
XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M - 
XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 - 
XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 - 
XX:G1MixedGCLiveThresholdPercent=90 - 
XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 - 
XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 - 
Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true 
-jar server.jar nogui

I get almost one crash a day, with it saying

java.lang.OutOfMemoryError: unable to create new native thread
    at java.lang.Thread.start0(Native Method) ~[?:1.8.0_282]
    at java.lang.Thread.start(Thread.java:717) ~[?:1.8.0_282]

Here is my configurations for stuff ive checked so far.

ulimit -a (I have changed my open files from 1024 and max user processes from 514861, the crash still happened)

core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 514861
max locked memory       (kbytes, -l) 65536
max memory size         (kbytes, -m) unlimited
open files                      (-n) 65535
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) unlimited
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

cat /proc/sys/kernel/pid_max
= 4194304
cat /proc/sys/kernel/threads-max
= 1029723
ps -eo nlwp | tail -n +2 | awk '{ num_threads += $1 } END { print 
num_threads }'
= 1340
cat /sys/fs/cgroup/pids/user.slice/user-1000.slice/pids.current
= 48
cat /sys/fs/cgroup/pids/user.slice/user-1000.slice/pids.max
= 339808

top - 14:41:56 up 10:38,  1 user,  load average: 3.95, 3.59, 3.50
Tasks: 333 total,   2 running, 331 sleeping,   0 stopped,   0 zombie
%Cpu(s): 17.4 us,  0.8 sy,  0.0 ni, 81.4 id,  0.0 wa,  0.0 hi,  0.4 si,  0.0 st
MiB Mem : 128819.0 total,  80682.1 free,  37721.6 used,  10415.4 buff/cache
MiB Swap:      0.0 total,      0.0 free,      0.0 used.  89871.1 avail Mem

PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
53162 pteroda+  20   0   20.3g  11.3g  39840 S 153.3   9.0 494:58.15 java
43419 pteroda+  20   0   20.3g   9.0g  37312 S 106.7   7.1 607:24.21 java
3153 pteroda+  20   0   17.2g   7.8g  38628 S  20.0   6.2 135:52.38 java
2274 pteroda+  20   0    9.9g   2.5g  33944 S   6.7   2.0  26:30.98 java
2275 pteroda+  20   0   15.4g   3.8g  30664 S   6.7   3.1  49:33.29 java
63729 pteroda+  20   0   18.2g   1.4g  30920 S   6.7   1.1  22:08.05 java
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.