Minecraft Server crashing overnight (using too many threads?) [closed]
Okay, i can't seem to find any articles related to my problem, so i'm asking here.
So, i have a google cloud VM, which has one core and one thread (checked with lscpu | egrep 'Model name|Socket|Thread|NUMA|CPU\(s\)'
) and 3.6Gi of RAM running Ubuntu
I'm running Bukkit and my minecraft version is 1.16.5
So usually the server works fine, aside from some of the plugins that should be stable (serversigns) acting weird, but every time i leave it running for the night and come back the next day, it has crashed. crash-reports doesn't have any logs.
The folder that i have the server jarfile in has some logs in this pattern: hs_err_pid11770.log
but i can't figure out what's the latest. I have written the error that occured the most below.
I think the problem is that Java is trying to use more threads than the VM has.
[06:13:38 INFO]: Using 4 threads for Netty based IO
Is there a way to prevent this? Is this even the problem?
hs_err_pid11770.log:
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 16384 bytes for committing reserved memory.
# Possible reasons:
# The system is out of physical RAM or swap space
# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native$
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Decrease Java heap size (-Xmx/-Xms)
# Decrease number of Java threads
# Decrease Java thread stack sizes (-Xss)
# Set larger code cache with -XX:ReservedCodeCacheSize=
# JVM is running with Zero Based Compressed Oops mode in which the Java heap is
# placed in the first 32GB address space. The Java Heap base address is the
# maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress
# to set the Java Heap base and to place the Java Heap above 32GB virtual address.
# This output file may be truncated or incomplete.
#
# Out of Memory Error (os_linux.cpp:2922), pid=11770, tid=15191
#
# JRE version: OpenJDK Runtime Environment (11.0.9.1+1) (build 11.0.9.1+1-post-Debian-1deb10u2)
# Java VM: OpenJDK 64-Bit Server VM (11.0.9.1+1-post-Debian-1deb10u2, mixed mode, tiered, compressed oops, serial $
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" b$
#
--------------- S U M M A R Y ------------
Command Line: -Xms3500M -Xmx3500M paperserver.jar -nogui
Host: Intel(R) Xeon(R) CPU @ 2.30GHz, 1 cores, 3G, Debian GNU/Linux 10 (buster)
Time: Thu Apr 8 19:34:31 2021 UTC elapsed time: 23858.828009 seconds (0d 6h 37m 38s)
--------------- T H R E A D ---------------
Current thread (0x00007f485c0f2000): JavaThread "luckperms-scheduler-worker-116" daemon [_thread_new, id=15191, s$
.
Here's some errors i get while starting the server and a little while after that if they're of any use.
[06:14:37 WARN]: java.lang.ClassNotFoundException: mc.alk.arena.alib.battlebukkitlib.compat.v1_16_R3.InventoryHandler
[06:14:37 WARN]: at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
[06:14:37 WARN]: at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:182)
[06:14:37 WARN]: at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:111)
[06:14:37 WARN]: at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
[06:14:37 WARN]: at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
[06:14:37 WARN]: at java.base/java.lang.Class.forName0(Native Method)
[06:14:37 WARN]: at java.base/java.lang.Class.forName(Class.java:315)
[06:14:37 WARN]: at mc.alk.arena.alib.battlebukkitlib.factory.HandlerFactory.getNewInstance(HandlerFactory.java:13)
[06:14:37 WARN]: at mc.alk.arena.alib.battlebukkitlib.factory.InventoryHandlerFactory.getNewInstance(InventoryHandlerFactory.java:10)
[06:14:37 WARN]: at mc.alk.arena.alib.battlebukkitlib.InventoryUtil.<clinit>(InventoryUtil.java:42)
[06:14:37 WARN]: at mc.alk.arena.serializers.ConfigSerializer.getTransitionOptions(ConfigSerializer.java:544)
[06:14:37 WARN]: at mc.alk.arena.serializers.BAConfigSerializer.parseOptionSets(BAConfigSerializer.java:283)
[06:14:37 WARN]: at mc.alk.arena.serializers.BAConfigSerializer.loadDefaults(BAConfigSerializer.java:86)
[06:14:37 WARN]: at mc.alk.arena.BattleArena.onEnable(BattleArena.java:218)
[06:14:37 WARN]: at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263)
[06:14:37 WARN]: at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:380)
[06:14:37 WARN]: at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483)
[06:14:37 WARN]: at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:501)
[06:14:37 WARN]: at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:415)
[06:14:37 WARN]: at net.minecraft.server.v1_16_R3.MinecraftServer.loadWorld(MinecraftServer.java:580)
[06:14:37 WARN]: at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:280)
[06:14:37 WARN]: at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1055)
[06:14:37 WARN]: at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:289)
[06:14:37 WARN]: at java.base/java.lang.Thread.run(Thread.java:834)§
and
[06:14:39 WARN]: java.lang.ClassNotFoundException: mc.alk.arena.alib.battlebukkitlib.compat.v1_16_R3.SignHandler
[06:14:39 WARN]: at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
[06:14:39 WARN]: at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:182)
[06:14:39 WARN]: at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:111)
[06:14:39 WARN]: at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
[06:14:39 WARN]: at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
[06:14:39 WARN]: at java.base/java.lang.Class.forName0(Native Method)
[06:14:39 WARN]: at java.base/java.lang.Class.forName(Class.java:315)
[06:14:39 WARN]: at mc.alk.arena.alib.battlebukkitlib.factory.HandlerFactory.getNewInstance(HandlerFactory.java:13)
[06:14:39 WARN]: at mc.alk.arena.alib.battlebukkitlib.factory.SignHandlerFactory.getNewInstance(SignHandlerFactory.java:10)
[06:14:39 WARN]: at mc.alk.arena.alib.battlebukkitlib.SignUtil.<clinit>(SignUtil.java:12)
[06:14:39 WARN]: at mc.alk.arena.listeners.SignUpdateListener.updateAttachedBlock(SignUpdateListener.java:80)
[06:14:39 WARN]: at mc.alk.arena.listeners.SignUpdateListener.updateSign(SignUpdateListener.java:59)
[06:14:39 WARN]: at mc.alk.arena.listeners.SignUpdateListener.updateAllSigns(SignUpdateListener.java:36)
[06:14:39 WARN]: at mc.alk.arena.BattleArena$1.run(BattleArena.java:275)
[06:14:39 WARN]: at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:100)
[06:14:39 WARN]: at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:468)
[06:14:39 WARN]: at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1064)
[06:14:39 WARN]: at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:289)
[06:14:39 WARN]: at java.base/java.lang.Thread.run(Thread.java:834)
and
java.io.FileNotFoundException: plugins/Updater/config.yml (Is a directory)
at java.io.FileInputStream.open0(Native Method) ~[?:?]
at java.io.FileInputStream.open(FileInputStream.java:219) ~[?:?]
at java.io.FileInputStream.<init>(FileInputStream.java:157) ~[?:?]
at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:126) ~[patched_1.16.5.jar:gi
t-Paper-575]
at mc.alk.arena.alib.battlepluginupdater.GitHubUpdater.update(GitHubUpdater.java:78) ~[?:?]
at mc.alk.arena.BattleArena.onEnable(BattleArena.java:293) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[patched_1.16.5.jar:git-Paper-575]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:380) ~[patched_1.16.5.jar:git
-Paper-575]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483) ~[patched_1.16.5.jar:gi
t-Paper-575]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:501) ~[patched_1.16.5.jar:git-
Paper-575]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:415) ~[patched_1.16.5.jar:git
-Paper-575]
at net.minecraft.server.v1_16_R3.MinecraftServer.loadWorld(MinecraftServer.java:580) ~[patched_1.16.5.jar:g
it-Paper-575]
at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:280) ~[patched_1.16.5.jar:git-Pa
per-575]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1055) ~[patched_1.16.5.jar:git-Pape
r-575]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:289) ~[patched_1.16.5.jar:
git-Paper-575]
I installed BattleBukkitLib (downloaded jarfile, put in plugins folder) and got this error:
org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:162) ~[patched_1.16.5.jar:git-Paper-575]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:148) ~[patched_1.16.5.jar:git-Paper-575]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.loadPlugins(CraftServer.java:389) ~[patched_1.16.5.jar:git-Paper-575]
at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:251) ~[patched_1.16.5.jar:git-Paper-575]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1055) ~[patched_1.16.5.jar:git-Paper-575]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:289) ~[patched_1.16.5.jar:git-Paper-575]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
... 7 more
I've tried starting the server with -XX:CICompilerCount=1
, but it won't start without the CompilerCount being 4.
**I solved this issue by setting the ram amount lover in the java command and using aikar's flags""
Best Answer
There is insufficient memory for the Java Runtime Environment to continue.
Get a better server (install more RAM), or check if there aren't memory leaks in one of your plugins.
Something has gone very wrong in LuckPerms. Try reporting it to the developer, however, from what I can see there isn't very much he could use to recreate your issue.
java.lang.ClassNotFoundException: mc.alk.arena.alib.battlebukkitlib.compat.v1_16_R3.SignHandler
and
java.lang.ClassNotFoundException: mc.alk.arena.alib.battlebukkitlib.compat.v1_16_R3.InventoryHandler
You're missing a jar file; dependency somewhere. Try:
- https://www.spigotmc.org/threads/battlearena.37552/
- https://github.com/BattlePlugins/BattleBukkitLib
However, these are warnings (and not fatal errors) and means you probably don't need to worry about it since the developer probably did code handling it.
java.io.FileNotFoundException: plugins/Updater/config.yml (Is a directory)
You're missing a config file from some sort of updater, or plugin called "Updater".
Pictures about "Minecraft Server crashing overnight (using too many threads?) [closed]"
Why does my Minecraft server keep closing itself?
There are several causes for Minecraft crashing on startup: the mods, bugs in the game, the corruption of the game files, and the missing or outdated graphics card driver.How many threads do Minecraft servers use?
The server (as of 1.14) does use additional cores for other operations, but typically three cores are used at most. Hyperthreading (HT) or simultaneous multithreading (SMT), i.e. a CPU providing 2 "threads" or "logical cores" for each physical core, does not seem to benefit Minecraft much.How do I fix the glitch on my Minecraft server?
This occurs when a hacker floods your network with traffic to ultimately disrupt the user and not allow them to access the content. The hacker is overloading the server with traffic, and thus, causing it to crash.Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Anete Lusina, Teona Swift, Teona Swift, Kelly L