“The server ran out of memory” means the server asked for more memory than its plan has, and stopped. Large worlds and big mods need more. Take off a mod you do not need, or move to a plan with more memory.
Confirm the finding
- Open the Crashes tab and choose the newest start.
- Under What the panel can tell, look for one of two findings:
- “The server ran out of memory”. The panel found a log line such as
OutOfMemoryExceptionorCannot allocate memory. - “The server used all its memory and was stopped”. The server reached its plan’s memory and the machine ended it, so it could not save or write why. The server’s own log usually has no line about it.
- “The server ran out of memory”. The panel found a log line such as
- Read the start’s header. For the second finding it shows Crashed and Out of memory Yes. Exit code may read 137, which means the server was killed.
The panel’s own advice for both: fewer mods or plugins, fewer players at once or a smaller world loaded help; a larger plan gives it more room.
What uses the memory
- Mods. On tModLoader, every mod on the list is loaded. A long list needs more memory. Vanilla loads no mods.
- The world. A Large world is bigger than a Small one. The size is chosen only when a world is made.
The panel does not say how much memory a mod or a world size needs, so there is no number to check against. Change one thing at a time and watch Crashes.
Fix it, cheapest first
- Take off mods you do not need (tModLoader). Open Mods, take them off the list, and choose Apply, or Apply and restart while the server runs. That restart disconnects everyone, so use Message everyone first.
- Move to a bigger plan. Plans with more memory are the sure fix when the world and the mods are what you want. Ask support how to change plans.
- Last, make a smaller world. This starts a new world, so the progress in the old one is not carried over. Open the World page and make a world with Make this world, choosing a smaller Size. It is made at the next start. Your old world stays, but a world you leave behind keeps using disk.
After each change, start the server and check Crashes again.
If it does not work
- It runs out again soon after a start. The mod list or the world is too big for this plan. Try the next step in the list above.
- The finding is not about memory. Read the other findings on the same report. See the server crashed.
More about plan sizes: Terraria server memory and sizes. More about the game: Terraria servers.