Server TPS dropping to <10 in ~1 min after starting up, then crashes (java.lang.OutOfMemoryError: Metaspace)

The Aternos forums are now deprecated

Learn more about this change here.

For help regarding Aternos, we recommend you to visit our support center.

  • I am an admin on a server and the server TPS keeps dropping to below 10 in about one minute after the server starts up. Right when the server starts up, the TPS is already around 15. It drops around 1 TPS every 5 seconds. A few minutes later, the server is unplayable even with one player and the player(s) will automatically be disconnect due to the server TPS. Then, the server crashes.


    Here is the log: https://mclo.gs/uatPE9S

    (This also generated eight extra errors for other plugins that I need for the server.)


    In the log, it states that the memory has ran out. "java.lang.OutOfMemoryError: Metaspace". Most of that is under the line where I executed the command "/ifo" (line 629-630). I don't really understand what the issue is when executing "/ifo".

    [14:09:31] [Server thread/ERROR]: [Essentials] Command ifo failed:
    632java.lang.OutOfMemoryError: Metaspace
    633at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]
    634at java.lang.ClassLoader.defineClass(ClassLoader.java:1012) ~[?:?]
    635at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]
    636at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:197) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
    637at java.lang.ClassLoader.loadClass(ClassLoader.java:587) ~[?:?]
    638at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:108) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
    639at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:103) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
    640at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
    641at com.earth2me.essentials.textreader.KeywordReplacer.replaceLine(KeywordReplacer.java:281) ~[EssentialsX-2.19.2.jar:?]
    642at com.earth2me.essentials.textreader.KeywordReplacer.replaceKeywords(KeywordReplacer.java:149) ~[EssentialsX-2.19.2.jar:?]
    643at com.earth2me.essentials.textreader.KeywordReplacer.<init>(KeywordReplacer.java:110) ~[EssentialsX-2.19.2.jar:?]
    644at com.earth2me.essentials.commands.Commandinfo.run(Commandinfo.java:20) ~[EssentialsX-2.19.2.jar:?]
    645at com.earth2me.essentials.commands.EssentialsCommand.run(EssentialsCommand.java:177) ~[EssentialsX-2.19.2.jar:?]
    646at com.earth2me.essentials.commands.EssentialsCommand.run(EssentialsCommand.java:172) ~[EssentialsX-2.19.2.jar:?]
    647at com.earth2me.essentials.Essentials.onCommandEssentials(Essentials.java:790) ~[EssentialsX-2.19.2.jar:?]
    648at com.earth2me.essentials.Essentials.onCommand(Essentials.java:693) ~[EssentialsX-2.19.2.jar:?]
    649at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
    650at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
    651at org.bukkit.craftbukkit.v1_18_R1.CraftServer.dispatchCommand(CraftServer.java:897) ~[paper-1.18.1.jar:git-Paper-177]
    652at net.minecraft.server.network.ServerGamePacketListenerImpl.handleCommand(ServerGamePacketListenerImpl.java:2287) ~[?:?]
    653at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2098) ~[?:?]
    654at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2079) ~[?:?]
    655at net.minecraft.network.protocol.game.ServerboundChatPacket.handle(ServerboundChatPacket.java:46) ~[?:?]
    656at net.minecraft.network.protocol.game.ServerboundChatPacket.a(ServerboundChatPacket.java:6) ~[?:?]
    657at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:56) ~[?:?]
    658at net.minecraft.network.protocol.PlayerConnectionUtils$$Lambda$9328/0x00000008028737d0.run(Unknown Source) ~[?:?]
    659at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.18.1.jar:git-Paper-177]
    660at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:149) ~[?:?]
    661at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:23) ~[?:?]
    662at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1413) ~[paper-1.18.1.jar:git-Paper-177]
    663at net.minecraft.server.MinecraftServer.c(MinecraftServer.java:189) ~[paper-1.18.1.jar:git-Paper-177]
    664at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:122) ~[?:?]



    Also, at line 624 & 626, it states:

    624 [14:08:16] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 96593ms or 1931 ticks behind

    626 [14:09:16] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 29685ms or 593 ticks behind


    What is happening?


    Please let me know if there are any solutions.

  • ZXVoidx

    Changed the title of the thread from “Server TPS dropping to <10 in ~1 min after starting up server” to “Server TPS dropping to <10 in ~1 min after starting up, then crashes (java.lang.OutOfMemoryError: Metaspace)”.
  • Just try removing some plugins