Out of memory

java.lang.OutOfMemoryError: unable to create new native thread

What the log looks like

java\.lang\.OutOfMemoryError: unable to create new native thread

How to fix it

  1. If this crash report comes from Hello Minecraft! Launcher (HMCL, especially versions 3.3.170 to 3.3.174), download and update to the latest stable HMCL release to fix its download thread leak.
  2. Check the 'Java VM Version' line in your crash report: if it says 'Client VM' or 32-bit instead of '64-Bit Server VM', install 64-bit Java and select it in your launcher settings.
  3. Lower (do not raise) your allocated Minecraft memory (-Xmx) so that at least 2 GB of physical RAM remains unallocated for your operating system and native Java threads.
  4. On macOS or Linux (especially Paper servers), run 'ulimit -u' in a terminal to check if your OS user process/thread limit is capped too low (e.g., 1024 or 2048), and increase the limit if needed.
  5. If the crash repeats on a modded game or Paper server after raising OS limits, remove recently added mods or plugins that perform heavy asynchronous network, database, or chunk tasks.
LoadersVanilla, Forge, Neoforge, Fabric, Quilt, Server
SeverityStops the game
CategoryOut of memory

Check your own log

Related errors