Forums Archived

This forum has been archived. No new posts can be made and no new users can sign up. It remains here for reference only.

Find the new forums here

Mincraft FTB Infinity Evolved: java.lang.OutOfMemoryError: unable to create new native thread

  • 174 Views
  • Last Post 26 November 2021
  • Topic Is Solved
xIceFox posted this 04 October 2021

OS Name/Version: Ubuntu 20.04.3 LTS (GNU/Linux 4.15.0 x86_64)

Product Name/Version: AMP Release "Callisto" v2.2.1, built 24/09/2021 17:47

Problem Description:

When I start my Infinity Evolved Server out of AMP, i can play for like 1 hour and then i get following exception and the server crashes: java.lang.OutOfMemoryError: unable to create new native thread.

I tried to narrow it down, and I found that when I start the Server manually throught the linux terminal, then it runs fine.

Steps to reproduce: I don't know how somebody can reproduce my problem.

Actions taken to resolve so far:

  • Restarting the whole vServer
  • Reinstalling Java 8
  • Allocating more RAM (allocated around 10GB on a small 3 players server, so i dont think this could be the reason)
  • Monitoring the threads, RAM and CPU in top for the Server (nothing bad there...)

Extra Information:

xIceFox posted this 26 November 2021

Okay after long debugging I fixed my error: The service: ampinstancemanager is created via the file: /etc/systemd/system/ampinstmgr.service My Ubuntu set the TasksMax for this service on 105. When running dual Minecraft Servers the service could not create more threads, because it got limited when reached 105 tasks.

Fix:

under the [Unit] in the File set: TasksMax=1000

Then restart service via: servic ampinstmgr restart

Close