mojira.dev
MC-225460

Cannot start server "out of memory"

Downloaded the newest version of the server.jar and installed the correct java version.

However, I get this when I try to start it:

[14:14:21] [main/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[14:14:22] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[14:14:22] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0]
[14:14:22] [main/WARN]: Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498]
[14:14:22] [main/WARN]: Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498]
[14:14:22] [main/WARN]: Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[14:14:22] [main/INFO]: Reloading ResourceManager: Default
[14:14:23] [Worker-Main-4/INFO]: Loaded 7 recipes
[14:14:24] [Worker-Main-4/INFO]: Loaded 1109 advancements
[14:14:26] [Server thread/INFO]: Starting minecraft server version 21w19a
[14:14:26] [Server thread/INFO]: Loading properties
[14:14:26] [Server thread/INFO]: Default game type: SURVIVAL
[14:14:26] [Server thread/INFO]: Generating keypair
[14:14:26] [Server thread/INFO]: Starting Minecraft server on *:25565
[14:14:27] [Server thread/INFO]: Using epoll channel type
Mai 13, 2021 2:14:27 PM io.netty.util.internal.MacAddressUtil defaultMachineId
WARNING: Failed to find a usable hardware address from the network interfaces; using random bytes: d4:db:c6:8b:30:04:bd:32
[14:14:27] [Server thread/INFO]: Preparing level "world"
[15,434s][warning][os,thread] Failed to start thread - pthread_create failed (EAGAIN) for attributes: stacksize: 1024k, guardsize: 0k, detached.
[15,435s][warning][os,thread] Failed to start thread - pthread_create failed (EAGAIN) for attributes: stacksize: 1024k, guardsize: 0k, detached.
[14:14:28] [IO-Worker-7/ERROR]: Caught exception in thread Thread[IO-Worker-7,5,main]
java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached
{{ at java.lang.Thread.start0(Native Method) ~[?:?]}}
{{ at java.lang.Thread.start(Thread.java:800) ~[?:?]}}
{{ at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:939) ~[?:?]}}
{{ at java.util.concurrent.ThreadPoolExecutor.processWorkerExit(ThreadPoolExecutor.java:1007) ~[?:?]}}
{{ at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]}}
{{ at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) ~[?:?]}}
{{ at java.lang.Thread.run(Thread.java:831) [?:?]}}
[74,514s][warning][os,thread] Failed to start thread - pthread_create failed (EAGAIN) for attributes: stacksize: 1024k, guardsize: 0k, detached.

 

Java version:

java version "16.0.1" 2021-04-20
Java(TM) SE Runtime Environment (build 16.0.1+9-24)
Java HotSpot(TM) 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)

EDIT:

Server HW:

CPU: Intel Xeon Silver 4116 (4) @ 1.999GHz

Memory: 123MiB / 8192MiB

 

 

Comments 2

This is the output of the crash report:

---- Minecraft Crash Report ----+-
// Quite honestly, I wouldn't worry myself about that.
{{ ./oossssoo/.}}
Time: 13.05.21, 14:14
Description: Exception in server tick loopjava.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:800)}}
{{ at io.netty.util.concurrent.ThreadPerTaskExecutor.execute(ThreadPerTaskExecutor.java:33)}}
{{ at io.netty.util.concurrent.SingleThreadEventExecutor.doStartThread(SingleThreadEventExecutor.java:873)}}
{{ at io.netty.util.concurrent.SingleThreadEventExecutor.startThread(SingleThreadEventExecutor.java:862)}}
{{ at io.netty.util.concurrent.SingleThreadEventExecutor.execute(SingleThreadEventExecutor.java:767)}}
{{ at io.netty.channel.AbstractChannel$AbstractUnsafe.register(AbstractChannel.java:479)}}
{{ at io.netty.channel.SingleThreadEventLoop.register(SingleThreadEventLoop.java:80)}}
{{ at io.netty.channel.SingleThreadEventLoop.register(SingleThreadEventLoop.java:74)}}
{{ at io.netty.channel.MultithreadEventLoopGroup.register(MultithreadEventLoopGroup.java:86)}}
{{ at io.netty.bootstrap.AbstractBootstrap.initAndRegister(AbstractBootstrap.java:333)}}
{{ at io.netty.bootstrap.AbstractBootstrap.doBind(AbstractBootstrap.java:282)}}
{{ at io.netty.bootstrap.AbstractBootstrap.bind(AbstractBootstrap.java:246)}}
{{ at acc.a(SourceFile:115)}}
{{ at aam.e(SourceFile:149)}}
{{ at net.minecraft.server.MinecraftServer.x(SourceFile:649)}}
{{ at net.minecraft.server.MinecraftServer.a(SourceFile:261)}}
{{ at java.base/java.lang.Thread.run(Thread.java:831)}}
A detailed walkthrough of the error, its code path and all known details is as follows:
----------------------------------------------------------------------------------------- System Details --
Details:
{{ Minecraft Version: 21w19a}}
{{ Minecraft Version ID: 21w19a}}
{{ Operating System: Linux (amd64) version 4.15.0}}
{{ Java Version: 16.0.1, Oracle Corporation}}
{{ Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode, sharing), Oracle Corporation}}
{{ Memory: 6823065680 bytes (6506 MB) / 7516192768 bytes (7168 MB) up to 7516192768 bytes (7168 MB)}}
{{ CPUs: 4}}
{{ JVM Flags: 2 total; -Xmx7168M -Xms7168M}}
{{ Data Packs: vanilla}}
{{ Is Modded: Unknown (can't tell)}}
{{ Type: Dedicated Server (map_server.txt)}}

Sounds like MC-138093, what CPU you have and what else is running on the server?

Can you run ```cat /proc/sys/kernel/threads-max``` and make sure the limit is not too low? (can be changed in policies)

Florian

(Unassigned)

Unconfirmed

(Unassigned)

21w19a

Retrieved