NexthostingLogs

Logs / Error guide / Garry's Mod

Garry's Mod: “ED_Alloc: no free edicts” – entity limit reached

What the message means

The Source engine can manage at most 8192 entities at the same time – props, vehicles, NPCs, weapons, effects. Once this limit is reached, no further entity can be created and the server usually crashes with Host_Error.

What it looks like in the log

Loading gamemode sandbox
Started map "gm_construct"
Client "Tom" connected (203.0.113.9:27005).
ED_Alloc: no free edicts
Host_Error: ED_Alloc: no free edicts

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

Common causes

  • Players spawn very many props (dupes, prop spam).
  • A map with very many built-in entities, plus addons that create more.
  • An addon creates entities and never cleans them up (for example drops, money bills, effects).
  • NPC spawners or loops that create entities without limit.

How to fix it

  1. Set prop limits per player (sbox_maxprops and the limits of your admin mod).
  2. Use a cleanup addon that removes leftover entities after some time.
  3. While the server runs, count with lua_run print(#ents.GetAll()) to see whether the number climbs over hours – then an addon isn't cleaning up.
  4. Try a different map to see how many entities the map itself brings.