NexthostingLogs

Logs / Error guide / Garry's Mod

Garry's Mod: “not enough memory” and Lua Panic

What the message means

Lua in Garry's Mod has a fixed memory limit, independent of your server's RAM. When it's full, Lua can't create anything more and the server crashes. Usually an addon keeps filling the memory over hours.

What it looks like in the log

Loading gamemode darkrp
Started map "rp_downtown_v4c"
Lua Panic! Something went horribly wrong!
not enough memory
Segmentation fault (core dumped)

Excerpt from an example log, marked the way the analysis marks it.

Common causes

  • An addon endlessly collects data in tables and never frees it (memory leak).
  • Very many or very large addons, especially with large configurations or databases held in memory.
  • Long uptime without a restart when a leak is present.

How to fix it

  1. Check with lua_run print(collectgarbage("count")) at intervals whether Lua memory grows steadily.
  2. Remove addons in groups as a test until memory stays stable – that's how you find the leak.
  3. Schedule a daily restart until it's fixed.
  4. Report the leak to the addon's author with the link to your log.