Out of memoryjava.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
- 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.
- 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.
- 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.
- 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.
- 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.
| Loaders | Vanilla, Forge, Neoforge, Fabric, Quilt, Server |
|---|
| Severity | Stops the game |
|---|
| Category | Out of memory |
|---|
Check your own log