Mods / Server Debugger

Tags:
Utility Server-Specific
Author:
El_Neuman
Side:
Both
Created:
Jul 18th at 4:54 PM
Last modified:
Jul 28th at 8:03 PM
Downloads:
578
Latest release (for Vintage Story 1.22.0-pre.1 - 1.22.4, potentially outdated):
Server Debugger v1.0.3.zip  1-click install
For testers (for Vintage Story 1.22.0-pre.1 - 1.22.5, potentially outdated):
Server Debugger v1.0.4-rc.1.zip  1-click install

 I’m ending my activity as a modder on VSMods due to what I consider discriminatory treatment from the site administration Even though my mod thumbnails do not violate CSAM laws and are not NSFW content, the administration required me to completely remove anime characters from my mod thumbnails because they are not directly related to the mods I consider this discriminatory because there are many mods on the site whose thumbnails do not always depict something directly related to the mod or the game itself They were simply mascots that, in my opinion, made the mod thumbnails more varied and interesting In any case, I consider the administration’s requirement completely legitimate - their site, their rules - but for me personally, this is unfair treatment that I am not willing to accept toward myself

If you want to contact me or continue development of any of my mods: Discrod: DeadSigma Telegram: El_Neuman

 

 

 

English

Server Debugger

A mod for server owners. It answers the question "why is my server lagging" - and, if a specific mod is at fault, it calls it out by name. It is a standalone mod and doesn't pull in any dependencies. It is installed only on the server; players do not need to download it.

It was written with the assumption that you are not a programmer. The commands below are explained in simple terms: what they do, why, and what they will show.


General information - what actually happens when the "server lags"

 

Click!

Every fraction of a second, the server does a "tick" - calculating the world: mobs, campfires, temperature, everything at once. If one tick takes not 0.05 seconds, but, say, 5 seconds - this is a freeze for the players: mobs freeze, blocks cannot be placed, and everyone "teleports".

There are only a few reasons for a long tick, and they require different treatments. This mod can distinguish them from each other and show exactly which one you have.

Two things you need to know to understand the mod's output:

  • Garbage and Garbage Collection (GC). The game and mods constantly create temporary objects in memory. When a lot of them accumulate, the system initiates a "garbage collection" (GC): it freezes, goes through all the memory, and throws away the unnecessary stuff. While the collection is running, the server is paused. Usually, this takes fractions of a second and goes unnoticed. But if gigabytes of memory have accumulated, a single collection can take seconds - and that's a freeze.
  • Memory leak. Garbage collection only throws away what is no longer needed by anyone. If a mod mistakenly continues to "hold" already dead mobs (does not release the reference to them) - garbage collection cannot throw them away. They accumulate. Memory usage grows, garbage collections become longer, and the server lags more and more. This is a leak. This is exactly the kind I caught on my server - a mod was holding tens of thousands of long-disappeared mobs.

 


How does Server Debugger differ from MemLeakInspector?

Click!

MemLeakInspector is a specialized tool for memory investigation. It shows what objects are in memory, allows you to analyze their state, and compare memory snapshots with each other. However, it does not automatically determine the cause of the problem - you have to interpret the results and look for the culprit yourself.

Server Debugger is a comprehensive server diagnostic tool. It analyzes main-thread freezes, lags, GC pauses, disk issues, and memory leaks. When a leak is detected, it immediately tries to identify the offending mod, which significantly speeds up finding the problem. At the same time, it does not provide deep analysis of objects in memory, temporal snapshots, or a detailed memory usage dashboard.

In other words, Server Debugger answers the question "which mod is causing the problem?", while MemLeakInspector answers "what objects are in memory and how do they change over time". These tools do not replace each other, but work perfectly together.


What the mod can and cannot do

 

Click!

Catches confidently and automatically

  • Memory leaks. When a mod mistakenly accumulates dead entities (mobs) in memory and doesn't release them - memory grows, and the server lags more and more. The mod finds this and calls out the culprit by name (command whodunit). 
  • Understand what causes the lag in the first place. For every freeze, the mod tells you where the time went: to garbage collection, to excessively long code, or if the server was simply waiting (disk, hardware). It will always point you in the right direction - you won't have to guess and dig in the wrong place.
  • Who manually triggers garbage collection. Sometimes a mod itself orders to "clean up garbage now", and with a large amount of memory, this causes a freeze. The /sdebug gccallers command shows which mod is doing this (in detail and with an example in the commands section below).
  • Poor garbage collection settings. The /sdebug env command will show if the fast garbage collection mode is enabled, and if not, this can be fixed (output example and how to fix it are below).

Helps, but won't name the culprit automatically

  • "Heavy code". Imagine: a mod author made a mistake, and their mod unnecessarily recalculates all 5000 garden beds on the server every tick, like the Wild Farming mod for example.  The memory doesn't grow - the code is just doing too much work. This is NOT a leak, and whodunit is useless here.

    What the mod will do: stalls (see below) will clearly write "this is heavy code, not garbage collection" - meaning it will give you the right direction. And to find the specific mod, there is profile (see below) - it measures time by code segments. But it doesn't look at all mods in a row, only at those specified in the settings (or similar to them). So here it is not a "click - get a name" situation like with a leak: you might have to give the debugger a hint on where to look. There is help, but no automation; you will have to go through the suspicious mods.

Cannot do at all

  • Lags due to disk, network, or weak hosting hardware. The mod will say "the cause is not in the mod code" - but it won't be able to fix it. This is an issue for the host.
  • Player-side lags (low FPS, stuttering screen). The mod is purely server-side; it does not see the client at all.
  • "Heavy, but correct". If those same 5000 garden beds honestly need to be calculated and there is no error in the code, the mod will show that time is being spent there, but this is no longer a bug, but rather a question of how the mod is designed. This is cured not by debugging, but by reworking the mod (or reducing the load on the server).

In one sentence

It will find a memory leak and name the culprit itself. For everything else, it will point you in the right direction ("it's the code", "it's the disk", "it's garbage collection"), but from there on, you will have to figure it out yourself.


Where to start


/sdebug stalls - analysis of recent freezes

When to use: first thing, as soon as the server lags or has lagged recently. This is the entry point for any investigation - it will tell you which way to dig further. On a freshly started, quiet server, it will show empty (no freezes yet) - this is normal.

The mod catches freezes itself and compiles an analysis of them. This command shows the latest ones (5 by default). Each freeze is a block, and the last line in it is the verdict in plain text, showing where the time went. Example:

ServerDebugger: FREEZE 
  Duration         : 5084 ms
  GC pause         : 5008 ms  (99%)
  ...
  VERDICT : GC PAUSE. The server was collecting garbage. Check for leaks: /sdebug leak

Or, if code is at fault rather than garbage:

  VERDICT : THE PROCESS WAS ACTUALLY CALCULATING, GC has nothing to do with it => hot code.
            Enable /sdebug profile on to find out which one.

Important and honestly: stalls will not name a specific mod on its own. It only gives the direction - "it's garbage collection" / "it's code" / "it's waiting for the disk". Who exactly is to blame is found by the following commands, each for its own direction. Where to go after the verdict:
  • verdict "GC PAUSE" -> this is memory. Go to the "About leaks" section below (leak and whodunit), and also check gc.
  • verdict "hot code" -> go to profile / top.
  • verdict "waiting for disk / lock" -> this is mostly hosting hardware, it cannot be fixed with code.

/sdebug env - overall server state

When to use: at any time, right after stalls for a general overview. The server should just be running, there is no need to trigger garbage collection - the command reads the current state.

It will show a block looking like this (unnecessary info removed):

ServerDebugger: environment 
  ProcessorCount       : 24
  Server GC            : False        <- this line is important
  Pause time %         : 18.5         <- and this one
  Memory load          : 6400 MB / 16000 MB

What to read:

  • Server GC - whether the fast garbage collection mode is enabled. False = slow single-threaded, collection lags more than it could. This is a "bad server setting". How to fix it - in the "Speeding up garbage collection" section at the very end of the README. After fixing, the line will become True.
  • Pause time % - what fraction of time goes to garbage collection. Single-digit percentages are normal. 15% and above (like 18.5 in the example) - garbage collection is exactly your problem.
  • Memory load - how much memory is taken. If it's close to the limit, memory itself can become the cause.

About leaks - two commands in order

If stalls showed the verdict "GC PAUSE" - it's most likely a leak. It is caught in two steps: first, /sdebug leak checks if there is one at all, then /sdebug whodunit names the culprit. They go exactly in this order.

/sdebug leak - STEP 1: is there a leak at all?

When to use: when the server's memory grows over time and lags intensify - and strictly after letting the server run for a while (an hour or two after start, or after an in-game night when many mobs have passed). On a newly started server, the leak hasn't accumulated yet, and the test will show empty.

The command performs a manual garbage collection (the server will freeze for a couple of seconds) and counts how many dead mobs survived it.

"Survived" = should have disappeared, but someone is holding them, and the garbage collection couldn't throw them away. The logic is simple: garbage collection doesn't touch living mobs, but if a long-disappeared mob "survived" the collection - it means it's being held illegally, and this is a leak.

What it will show: the percentage of survivors.

  • Around zero - there is no leak. We are done with leaks here, look for the cause of lags elsewhere (see stalls, env).
  • 80% and higher - there is a leak. Proceed to step 2 - /sdebug whodunit.

/sdebug whodunit - STEP 2: who is to blame for the leak?

When to use: right after /sdebug leak has shown a high percentage (the leak is confirmed). There is no point in doing it earlier - if there is no leak, there is no reason to look for the culprit.
This command also does the following:

  1. Performs a manual garbage collection (the server may freeze for a few seconds).
  2. Finds all the dead mobs that someone is still holding.
  3. Traces who exactly is holding them, and through which mod this reference goes.
  4. Outputs a list: which mod holds how many dead objects, along with the file name and location in the code.

Nothing needs to be configured in advance. The result looks like this:

     WHO IS HOLDING THE LEAK
traced 14,203 objects to their owner in 8 s
retained objects by mod
14203 <- Rust and Rustbound Creatures
file : RustboundCreatures.dll
type : RustCreaturesReworked.BowtornTuning
field : MoveSpeedBaselines
18 <- Another mod
3 <- Vanilla / Engine

The first entry is the main culprit. From there, you can decide whether to remove the mod, update it, or report the issue to its author.

/sdebug entities - total number of living mobs in the world

When to use: at any moment when you want to understand if there are really a lot of mobs in the world, or if they are only "hanging" in memory. Useful alongside /sdebug leak - together they distinguish a leak from a real influx.

Shows how many entities the game itself considers loaded, broken down by type and by the most "populated" areas of the map.

Why: to distinguish a leak from a real influx. If the command shows 80,000 mobs - they are really in the world, something broke the spawn limit. If it shows 200, and /sdebug leak at the same time finds thousands of "dead" ones - it means the mobs disappeared long ago but are hanging in memory. This is a leak.

Miscellaneous

  • /sdebug threshold [ms] - from what duration a freeze enters the log (default is 500 ms = half a second).
  • /sdebug lang [code] - output language (see below).
  • /sdebug reset - clear the accumulated statistics.

Mod configuration

 

Click!

On the first launch, the ModConfig/ServerDebuggerConfig.json file is created:

{
  "Language": "en",
  "StallThresholdMs": 500,
  "WatchedModMarkers": [ "xskills", "xlib", "xleveling", "xeffects" ]
}
  • Language - default output language.
  • StallThresholdMs - from what duration (in milliseconds) a freeze is considered worthy of being recorded in the log. 500 = half a second.
  • WatchedModMarkers - a hint for /sdebug profile and /sdebug findroot on which mods to watch by default. The values xskills, xlib etc. here are just an example (the mod was originally written while debugging these mods). This is not a dependency: ServerDebugger itself does not depend on xskills/xlib at all and works on any server with any mods. If you want - erase them and enter your own, or leave it as it is. The main commands (whodunit, leak, entities, stalls, gc, gccallers, env) ignore this list and always work. A regular user doesn't need to touch it.

Language

 

Click!

Change output language on the fly:

/sdebug lang en

The selection is saved. Without a code, the command will show the current language and a list of available ones.

To add your own language: copy assets/serverdebugger/lang/en.json to a file with your code (for example aaa.json) and translate the values. Placeholders {0}, {1} and commands /debug ... should not be touched - only the text around them. The file will be picked up automatically. If any string is missing in your file - the English one will be substituted, so you can translate gradually.

Technical words (names of collection reasons like AllocSmall, code location names in the findroot output) are intentionally not translated - they are identifiers, they need to be seen as they are.


 

Speeding up garbage collection (if env showed Server GC : False)

 

Click!

This is the very "how to fix" mentioned in the /sdebug env description. If the command showed Server GC : False on a powerful server - garbage collection is running in a single thread, slowly, and the pauses are longer than they could be. It is cured by editing one configuration file.

What to do

  1. Through the hosting file manager, find the file VintagestoryServer.runtimeconfig.json (located next to the server itself).
  2. First, make a copy of it - in case something goes wrong, you can revert it back.
  3. Open the file. Inside there is a section called configProperties. Add four lines to it (don't forget the comma at the end of the previous line):
"System.GC.Server": true,
"System.GC.Concurrent": true,
"System.GC.HeapCount": 6

The entire file will look something like this:

{
  "runtimeOptions": {
    "tfm": "net10.0",
    "framework": {
      "name": "Microsoft.NETCore.App",
      "version": "10.0.0"
    },
    "configProperties": {
      "System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
      "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false,
      "System.Runtime.TieredPGO": true,
      "System.GC.Server": true,
      "System.GC.Concurrent": true,
    "System.GC.HeapCount": 6
    }
  }
}
  1. Save the file and do a full restart of the server - not a "reload", but a real restart. The setting is read only on launch, otherwise it won't apply.
  2. Check: enter /sdebug env. The line should become Server GC : True, and Pause time % - noticeably drop.

What these lines mean (in simple terms)

  • Server GC - enables fast garbage collection in multiple threads instead of one. This is the main thing.
  • Concurrent - part of the collection happens in the background without stopping the server.
  • HeapCount - across how many cores to distribute the collection. We set 6: fast, but not too greedy for memory (without a limit, collection would take much more memory).

What to expect

On a real server, this setting reduced the pause time from 28% to less than 1%, and freezes from garbage collection became almost unnoticeable. This doesn't fix a leak (a leak must be removed separately, via whodunit), but it makes any garbage collection orders of magnitude faster.

Mod Version Mod IdentifierFor Game version Downloads Released Changelog Download 1-click mod install*
1.0.4-rc.1 serverdebugger
1.22.0-pre.1 - 1.22.5
154 Jul 28th at 8:00 PM Server Debugger v1.0.4-rc.1.zip 1-click install
  • Added the /sdebug spawns on command to track mob spawns on the server (/sdebug spawns to view the results)
  • Added the /sdebug ticks on command to track server ticks (/sdebug ticks to view the results)
    This is a prerelease test version with no documentation yet and only English and Russian localization
1.0.3 serverdebugger
1.22.0-pre.1 - 1.22.4
237 Jul 20th at 10:07 PM Server Debugger v1.0.3.zip 1-click install
  • Added the clearlog command to clear the serverdebugger-watchdog.txt file.

  • Commands executed through the in-game chat no longer break it and are now displayed correctly.

1.0.2 serverdebugger
1.22.0-pre.1 - 1.22.3
65 Jul 20th at 12:27 AM Server Debugger v1.0.2.zip 1-click install

The mod barely had a chance to be released, yet its commands were already outdated. Fixed - the commands have now been updated:

/xswd   →  /sdebug
/debug  →  /sdebug
1.0.1 serverdebugger
1.22.0-pre.1 - 1.22.3
62 Jul 19th at 11:35 AM Server Debugger v1.0.1.zip 1-click install
  • Fixed a command conflict with /debug that prevented the mod from loading. By default, the mod now uses /sdebug instead. 
1.0.0 serverdebugger
1.22.0-pre.1 - 1.22.3
60 Jul 18th at 11:04 PM ServerDebugger v1.0.0.zip 1-click install

Erste Version :)

Disclaimer

By downloading a mod you consent to our Terms of Use.

We tell you this specifically because we want to make sure you are aware that we cannot validate every mod, and you are responsible for any damages you might incur by installing or loading mods.

This prompt will not be shown to you again (for the current browser session) if you proceed.


27 Comments (oldest first | newest first) (threaded | flat)

GoNyan360, Sep 20th at 1:23 AM

It keeps giving us a hot code verdict and then putting nothing after "Candidate:", idk if thats a bug or what that means otherwise

 

example from main server log

19.9.2026 20:58:27 [Notification] -_-_-_- ServerDebugger: MAIN THREAD STALL -_-
_-_-
  Time                 : 20:58:27.943
  Duration             : 617.3 ms
  -_-_-_- where the time went (deltas during the stall) -_-_-_-
  GC pause             : 74.1 ms  (12%)
  Process CPU          : 527.1 ms  (85%)  <= COMPUTING or WAITING? Here's the a
nswer
  ThreadPool latency   : 0.1 ms
  CPU throttling       : 0.0 ms  (0%)  (nr_throttled +0)
  PSI CPU   (some)     : 0.5 ms  (0%)
  PSI IO    (full)     : 0.0 ms  (0%)
stall.psi-mem
stall.bg-header
stall.bg-alloc
stall.bg-cpu
stall.mem-header
stall.gc-reason
  Collections          : gen0 +2, gen1 +1, gen2 +0

  Allocated in window  : 12 MB  (with the main thread stalled this is almost always ~0 - not a useful indicator)
  Heap                 : 3324 MB -> 3314 MB
  Committed            : 3348 MB, fragmented 882 MB  (27% of the heap)
  Working set / commit : 3658 MB / 4153 MB  (in RAM 88%)
  Page faults          : N/A
  Memory load          : 11598 MB / 128863 MB  (threshold 123708 MB, free 117265 MB)
  cgroup memory        : 5160 MB / unlimited, pgmajfault +0
  -_-_-_- code -_-_-_-
stall.culprit-none
  VERDICT              : THE PROCESS WAS ACTUALLY COMPUTING, GC is not involved => hot code. Candidate: 

19.9.2026 20:58:36 [Warning] Server overloaded. A tick took 505ms to complete.
19.9.2026 20:58:46 [Warning] Server overloaded. A tick took 515ms to complete.
19.9.2026 20:58:46 [Notification] -_-_-_- ServerDebugger: MAIN THREAD STALL -_-_-_-

Time                 : 20:58:46.952
  Duration             : 555.7 ms
  -_-_-_- where the time went (deltas during the stall) -_-_-_-
  GC pause             : 15.3 ms  (3%)
  Process CPU          : 305.7 ms  (55%)  <= COMPUTING or WAITING? Here's the answer
  ThreadPool latency   : 0.0 ms
  CPU throttling       : 0.0 ms  (0%)  (nr_throttled +0)
  PSI CPU   (some)     : 0.3 ms  (0%)
  PSI IO    (full)     : 0.0 ms  (0%)
stall.psi-mem
stall.bg-header
stall.bg-alloc
stall.bg-cpu
stall.mem-header
stall.gc-reason
  Collections          : gen0 +1, gen1 +0, gen2 +0
  Allocated in window  : 13 MB  (with the main thread stalled this is almost always ~0 - not a useful indicator)
  Heap                 : 3373 MB -> 3378 MB
  Committed            : 3404 MB, fragmented 613 MB  (18% of the heap)
  Working set / commit : 3722 MB / 4218 MB  (in RAM 88%)
  Page faults          : N/A
  Memory load          : 11598 MB / 128863 MB  (threshold 123708 MB, free 117265 MB)
  cgroup memory        : 5229 MB / unlimited, pgmajfault +0
  -_-_-_- code -_-_-_-
stall.culprit-none
  VERDICT              : THE PROCESS WAS ACTUALLY COMPUTING, GC is not involved => hot code. Candidate: 

c0ward, Sep 2nd at 9:34 PM

Hello, I'm trying to investigate a freeze I'm getting. The verdict keeps being Hot Code, and to enable the profiler to start narrowing down the culprit, but the instructions for how to use the profiler once it is enabled aren't very clear :(

 

How do you "specify in the settings" which mods you want it to look at?

darklord1622, Aug 15th at 10:15 PM

So I did what you wrote in the speedup garbage collection section but the server GC still shows up as false so what is the solution?

smt923, Jul 28th at 3:06 PM (modified Jul 28th at 3:07 PM)

is there any more info on how the findroot tool works? is it automatically picking which leaked entities to 'find'? im looking to hunt down what exactly is causing me to leak memory from drifters so i want to like 'trace' who is holding references to that but i can't tell if it's looking up my leaked drifters or some other target entity:

In World:

vsserver122  | 28.7.2026 15:55:44 [Server Notification] -_-_-_- ServerDebugger: entities in the world -_-_-_-
vsserver122  |   LoadedEntities       : 516   <= this is how many entities the game ITSELF considers loaded
vsserver122  |   of which dead/corpses: 6
vsserver122  |   farther than 256 blocks from any player: 142
vsserver122  |   -_-_-_- by type -_-_-_-
vsserver122  |       428  EntityAgent
vsserver122  |        44  EntityFish
vsserver122  |        12  EntityDrifter
vsserver122  |         7  EntitySnailPickup
vsserver122  |         6  EntityArmorStand
vsserver122  |         6  EntityStrawDummy
vsserver122  |         4  EntitySnailPickupBig
vsserver122  |         2  EntityBell
vsserver122  |         2  EntityOutlaw
vsserver122  |         2  EntityShiver
vsserver122  |         1  EntityPlayer
vsserver122  |         1  EntitySentryRM
vsserver122  |         1  EntityBoat
vsserver122  |   -_-_-_- densest chunks -_-_-_-
vsserver122  |        28  chunk 16001 / 16016
vsserver122  |        23  chunk 16001 / 16017
vsserver122  |        15  chunk 16000 / 16017
vsserver122  |        13  chunk 16002 / 16020
vsserver122  |         8  chunk 16000 / 16016

Leaked:
vsserver122  | 28.7.2026 15:57:23 [Server Notification] -_-_-_- ServerDebugger: memory leak test -_-_-_-
vsserver122  |   Despawned (canary)       : 1329
vsserver122  |   Survived full GC         : 1329  (100.0%)
vsserver122  |   Full GC took            : 6954.7 ms
vsserver122  |   Managed heap            : 3531 MB -> 3487 MB
vsserver122  |   -_-_-_- what exactly refuses to die -_-_-_-
vsserver122  |       736  EntityDrifter
vsserver122  |       408  EntityAgent
vsserver122  |       136  EntityShiver
vsserver122  |        19  EntityFish
vsserver122  |        13  EntityDummySpellEffectsRM
vsserver122  |         4  EntitySentryRM
vsserver122  |         4  EntityDroneRM
vsserver122  |         3  EntityLocust
vsserver122  |         2  EntityArmorStand
vsserver122  |         2  EntitySnailPickup
vsserver122  |         1  EntityBell
vsserver122  |         1  EntityOutlaw
vsserver122  |   VERDICT                  : MEMORY LEAK. Despawned entities are not collected by the GC - something is still holding references to them.
whodunit (not finding it?)
vsserver122  | 28.7.2026 15:57:36 [Server Notification] -_-_-_- ServerDebugger: WHO IS HOLDING THE LEAK -_-_-_-
vsserver122  |   traced 3 leaked objects back to their holder in 21.2 s
vsserver122  | -_-_-_- retained objects by mod -_-_-_-
vsserver122  |         3  <- vanilla / engine
vsserver122  |         file  : VintagestoryAPI.dll
vsserver122  |         type  : Vintagestory.API.Common.Entities.Entity[]
vsserver122  |         field : []
Findroot: (I dont know what the EntityAgents are, i want it to trace drifters!)

 

vsserver122  | 28.7.2026 16:01:02 [Server Notification] -_-_-_- ServerDebugger: searching for the reference holder -_-_-_-
vsserver122  |   canary             : 1690 entries
vsserver122  |   survived GC        : 1690
vsserver122  |   still in world     : 36 (not targets)
vsserver122  |   selected targets   : 6
vsserver122  |       target: EntityAgent #1642764
vsserver122  |       target: EntityAgent #1642765
vsserver122  |       target: EntityAgent #31072
vsserver122  |       target: EntityAgent #476
vsserver122  |       target: EntityAgent #47729
vsserver122  |       target: EntityAgent #38586

 

vsserver122  | 28.7.2026 16:01:32 [Server Notification] -_-_-_- ServerDebugger: findroot SUMMARY -_-_-_- mode all
vsserver122  |
vsserver122  |   >>> PATH TO EntityAgent #1642764 (depth 8) <<<
vsserver122  |     static EntityManager.entityLedger   [EntityLedger]
vsserver122  |       -> EntityLedger.ledgerEntries   [Dictionary]
vsserver122  |         -> Dictionary._entries   [Entry[]]
vsserver122  |           -> [1]   [Entry]
vsserver122  |             -> Entry.value   [EntityLedgerEntry]
vsserver122  |               -> EntityLedgerEntry.meaEntityLedgerEntry   [ManagedEntityArray]
vsserver122  |                 -> ManagedEntityArray._managedEntityArray   [List]
vsserver122  |                   -> List._items   [Entity[]]
vsserver122  |                     -> [0]   [EntityAgent]
vsserver122  |   >>> MOD HOLDING THE REFERENCE: vanilla / engine (VintagestoryAPI.dll) <<<
vsserver122  |
vsserver122  |   >>> PATH TO EntityAgent #1642765 (depth 8) <<<
vsserver122  |     static EntityManager.entityLedger   [EntityLedger]
vsserver122  |       -> EntityLedger.ledgerEntries   [Dictionary]
vsserver122  |         -> Dictionary._entries   [Entry[]]
vsserver122  |           -> [1]   [Entry]
vsserver122  |             -> Entry.value   [EntityLedgerEntry]
vsserver122  |               -> EntityLedgerEntry.meaEntityLedgerEntry   [ManagedEntityArray]
vsserver122  |                 -> ManagedEntityArray._managedEntityArray   [List]
vsserver122  |                   -> List._items   [Entity[]]
vsserver122  |                     -> [1]   [EntityAgent]
vsserver122  |   >>> MOD HOLDING THE REFERENCE: vanilla / engine (VintagestoryAPI.dll) <<<
vsserver122  |
vsserver122  |   >>> PATH TO EntityAgent #476 (depth 8) <<<
vsserver122  |     static EntityManager.entityLedger   [EntityLedger]
vsserver122  |       -> EntityLedger.ledgerEntries   [Dictionary]
vsserver122  |         -> Dictionary._entries   [Entry[]]
vsserver122  |           -> [1]   [Entry]
vsserver122  |             -> Entry.value   [EntityLedgerEntry]
vsserver122  |               -> EntityLedgerEntry.meaEntityLedgerEntry   [ManagedEntityArray]
vsserver122  |                 -> ManagedEntityArray._managedEntityArray   [List]
vsserver122  |                   -> List._items   [Entity[]]
vsserver122  |                     -> [5]   [EntityAgent]
vsserver122  |   >>> MOD HOLDING THE REFERENCE: vanilla / engine (VintagestoryAPI.dll) <<<
vsserver122  |
vsserver122  |   >>> PATH TO EntityAgent #38586 (depth 8) <<<
vsserver122  |     static EntityManager.entityLedger   [EntityLedger]
vsserver122  |       -> EntityLedger.ledgerEntries   [Dictionary]
vsserver122  |         -> Dictionary._entries   [Entry[]]
vsserver122  |           -> [1]   [Entry]
vsserver122  |             -> Entry.value   [EntityLedgerEntry]
vsserver122  |               -> EntityLedgerEntry.meaEntityLedgerEntry   [ManagedEntityArray]
vsserver122  |                 -> ManagedEntityArray._managedEntityArray   [List]
vsserver122  |                   -> List._items   [Entity[]]
vsserver122  |                     -> [6]   [EntityAgent]
vsserver122  |   >>> MOD HOLDING THE REFERENCE: vanilla / engine (VintagestoryAPI.dll) <<<
vsserver122  |
vsserver122  |   >>> PATH TO EntityAgent #31072 (depth 8) <<<
vsserver122  |     static EntityManager.entityLedger   [EntityLedger]
vsserver122  |       -> EntityLedger.ledgerEntries   [Dictionary]
vsserver122  |         -> Dictionary._entries   [Entry[]]
vsserver122  |           -> [4]   [Entry]
vsserver122  |             -> Entry.value   [EntityLedgerEntry]
vsserver122  |               -> EntityLedgerEntry.meaEntityLedgerEntry   [ManagedEntityArray]
vsserver122  |                 -> ManagedEntityArray._managedEntityArray   [List]
vsserver122  |                   -> List._items   [Entity[]]
vsserver122  |                     -> [3]   [EntityAgent]
vsserver122  |   >>> MOD HOLDING THE REFERENCE: vanilla / engine (VintagestoryAPI.dll) <<<
vsserver122  |
vsserver122  |   >>> PATH TO EntityAgent #47729 (depth 8) <<<
vsserver122  |     static EntityManager.entityLedger   [EntityLedger]
vsserver122  |       -> EntityLedger.ledgerEntries   [Dictionary]
vsserver122  |         -> Dictionary._entries   [Entry[]]
vsserver122  |           -> [4]   [Entry]
vsserver122  |             -> Entry.value   [EntityLedgerEntry]
vsserver122  |               -> EntityLedgerEntry.meaEntityLedgerEntry   [ManagedEntityArray]
vsserver122  |                 -> ManagedEntityArray._managedEntityArray   [List]
vsserver122  |                   -> List._items   [Entity[]]
vsserver122  |                     -> [4]   [EntityAgent]
vsserver122  |   >>> MOD HOLDING THE REFERENCE: vanilla / engine (VintagestoryAPI.dll) <<<
vsserver122  |
vsserver122  |   objects visited     : 10362026
vsserver122  |   registries pruned   : 1742517
vsserver122  |   max depth reached   : 7
vsserver122  |   time                : 29.8 s
vsserver122  |   paths found         : 6 of 6

El_Neuman , Jul 28th at 4:28 PM
@smt923: is there any more info on how the findroot tool works? is it automatically picking which leaked entities to 'find'? im looking to hunt down what exactly is causing me to leak memory from drifters so i want to like 'trace' who is holding references to that

Yes, findroot selects objects automatically. It takes the first few despawned entities that survived garbage collection, not specifically drifters. That's why you're seeing EntityAgent objects instead of EntityDrifter - at the moment, there's no way to tell it to search for a specific type.
More importantly, though, look at what it actually found. Every path ends at EntityManager.entityLedger from VintagestoryAPI.dll, not at any mod. That EntityLedger is a built-in engine data structure. There's a good chance this isn't a memory leak at all and that it's an oversight on my part. It's possible the ledger intentionally keeps recently removed entities for a while and clears them later. The fact that the tool identifies engine code as the retaining object may indicate a false positive caused by the engine's internal behavior rather than a leak in any mod.
Please run /sdebug leak several times with about a 3-4-minute interval between each run. If the number of existing objects keeps increasing, then it's a memory leak. If it stays roughly the same or EntityLedger gets cleared, then it's just a characteristic of how the engine tracks entities. I'll investigate whether EntityLedger should be excluded from the tracing process. Thanks for the detailed logs, and I'm waiting for more logs from you :)

smt923, Jul 28th at 4:50 PM (modified Jul 28th at 4:53 PM)
@El_Neuman: Yes, findroot selects objects automatically. It takes the first few despawned entities that survived garbage collection, not specifically drifters. That's why you're seeing EntityAgent objects instead of EntityDrifter - at the moment, there's no way to te

it definitely keeps increasing, ive been tracking this down for a few days now, using both your tool and the more manual memory tool which i think shows just how many 'drifters' pile up over a long game session: 

output from memleakinspector

in my vintage story server ive narrowed down my debugging to what seems to be excessive drifter spawning

across the whole 5-6 hour session totals:

28.7.2026 08:22:44 [Server Notification] [MemLeakInspector] Report: 'after4'
28.7.2026 08:22:44 [Server Notification]   Heap: 7192 MB
28.7.2026 08:22:44 [Server Notification]    21029 × Vintagestory.GameContent.EntityDrifter
28.7.2026 08:22:44 [Server Notification]    10924 × Vintagestory.API.Common.EntityAgent
28.7.2026 08:22:44 [Server Notification]     3955 × Vintagestory.GameContent.EntityShiver
28.7.2026 08:22:44 [Server Notification]     3756 × Vintagestory.GameContent.BlockEntityGeneric
28.7.2026 08:22:44 [Server Notification]     2938 × rustboundmagic.src.common.entity.EntityDummySpellEffectsRM
28.7.2026 08:22:44 [Server Notification]     2825 × Vintagestory.GameContent.BlockEntityChisel
28.7.2026 08:22:44 [Server Notification]     2726 × Vintagestory.GameContent.BlockEntityMicroBlock
28.7.2026 08:22:44 [Server Notification]     2380 × Vintagestory.API.Common.EntityItem
28.7.2026 08:22:44 [Server Notification]     1740 × Vintagestory.GameContent.BlockEntityFarmland
28.7.2026 08:22:44 [Server Notification]     1431 × Vintagestory.GameContent.EntityButterfly

this one shows the timeline across multiple snapshots (also taking into account gc/cleaned):

28.7.2026 08:24:52 [Server Notification] [MemLeakInspector] History for 'EntityDrifter':
28.7.2026 08:24:52 [Server Notification] 02:52:58 [##                               ] 2156
28.7.2026 08:24:52 [Server Notification] 06:34:56 [################    ] 17763 (+15607)
28.7.2026 08:24:52 [Server Notification] 06:45:06 [#################   ] 18482 (+719)
28.7.2026 08:24:52 [Server Notification] 07:01:40 [##################  ] 19795 (+1313)
28.7.2026 08:24:52 [Server Notification] 07:18:04 [####################] 21029 (+1234)

using this list:

28.7.2026 08:26:13 [Server Notification] [MemLeakInspector] Snapshots (newest first):
  2026-07-28 07:18:04  after4.json.gz
  2026-07-28 07:01:40  after3.json.gz
  2026-07-28 06:45:06  after2.json.gz
  2026-07-28 06:34:56  after.json.gz
  2026-07-28 02:52:58  before.json.gz


you can see only 17 minutes or so passed between these two:

28.7.2026 08:26:27 [Server Notification] Handling Console Command /mem diff after3 after4
28.7.2026 08:26:27 [Server Notification] [MemLeakInspector] Running in background...
28.7.2026 08:26:27 [Server Notification] [MemLeakInspector] Diff: after3 → after4
28.7.2026 08:26:27 [Server Notification] [Δ] Vintagestory.GameContent.EntityDrifter: +1234
28.7.2026 08:26:27 [Server Notification] [Δ] Vintagestory.API.Common.EntityAgent: +751
28.7.2026 08:26:27 [Server Notification] [Δ] Vintagestory.GameContent.EntityShiver: +250
28.7.2026 08:26:27 [Server Notification] [Δ] Vintagestory.GameContent.BlockEntityChisel: +89
28.7.2026 08:26:27 [Server Notification] [Δ] Vintagestory.GameContent.BlockEntityFruitTreeFoliage: +18
28.7.2026 08:26:27 [Server Notification] [Δ] Vintagestory.API.Common.EntityItem: +15
28.7.2026 08:26:27 [Server Notification] [Δ] Vintagestory.GameContent.BlockEntityFruitTreeBranch: +13
28.7.2026 08:26:27 [Server Notification] [Δ] Vintagestory.GameContent.BlockEntityBerryBush: +11
28.7.2026 08:26:27 [Server Notification] [Δ] Vintagestory.GameContent.EntityFish: +11
28.7.2026 08:26:27 [Server Notification] [Δ] rustboundmagic.src.common.entity.EntityDroneRM: +9
28.7.2026 08:26:27 [Server Notification] [Δ] Vintagestory.GameContent.EntityArmorStand: +8
28.7.2026 08:26:27 [Server Notification] [Δ] Vintagestory.GameContent.BlockEntityBarrel: +5
28.7.2026 08:26:27 [Server Notification] [Δ] Vintagestory.GameContent.EntityLocust: +5
28.7.2026 08:26:27 [Server Notification] [Δ] Vintagestory.GameContent.BlockEntitySpawner: +2
28.7.2026 08:26:27 [Server Notification] [Δ] Vintagestory.GameContent.BlockEntityDisplayCase: +2
28.7.2026 08:26:27 [Server Notification] [Δ] rustboundmagic.src.common.entity.EntitySentryRM: +2
28.7.2026 08:26:27 [Server Notification] [Δ] CombatOverhaul.RangedSystems.ProjectileEntity: +2
28.7.2026 08:26:27 [Server Notification] [Δ] Vintagestory.GameContent.EntityBell: +1
28.7.2026 08:26:27 [Server Notification] [Δ] Vintagestory.GameContent.BlockEntityPlantContainer: +1
28.7.2026 08:26:27 [Server Notification] [Δ] Vintagestory.GameContent.BlockEntityToolrack: +1
28.7.2026 08:26:27 [Server Notification] [Δ] Vintagestory.GameContent.BlockEntityLocustNest: +1
28.7.2026 08:26:27 [Server Notification] [Δ] Vintagestory.GameContent.EntityTrader: +1
28.7.2026 08:26:27 [Server Notification] [Δ] Vintagestory.GameContent.BlockEntityBucket: +1
28.7.2026 08:26:27 [Server Notification] [Δ] OutlawMod.EntityOutlaw: +1
28.7.2026 08:26:27 [Server Notification] [Δ] Vintagestory.GameContent.BlockEntityQuern: +1
28.7.2026 08:26:27 [Server Notification] [Δ] Vintagestory.GameContent.BlockEntityOmokTable: -1
28.7.2026 08:26:27 [Server Notification] [Δ] PrimitiveSurvival.ModSystem.BEBombFuse: -1
28.7.2026 08:26:27 [Server Notification] [Δ] Vintagestory.GameContent.BlockEntityForge: -2
28.7.2026 08:26:27 [Server Notification] [Δ] StoneQuarry.BEStoneSlab: -2

yet we gained 1200 drifters, it must be a bug, presumably with a mod causing more to spawn and not be cleaned up but i cannot for the life of me work it out

 

later on i can probably do some longer tests with your tool, but im definitely struggling to track down what would cause so many drifters to hang around in memory, ive tried TPing to the entity IDs and i dont see anything there, my assumption is maybe some mod or interaction between mods is modifying something with drifters and then it's hanging but for some reason that isn't detectable by these tools, but honestly i dont really know

El_Neuman , Jul 28th at 5:19 PM
@smt923: it definitely keeps increasing, ive been tracking this down for a few days now, using both your tool and the more manual memory tool which i think shows just how many 'drifters' pile up over a long game session: output from memleakinspector in my vintage

Based on what you posted, everything points to this not being a memory leak. The drifters are held by the vanilla EntityLedger, and their count is growing linearly (+1200 every 17 minutes), while no mod is growing proportionally. With a real memory leak, a mod usually retains objects of its own type or references to them. Here, it looks much more like the spawn rate is exceeding the despawn rate, meaning the drifters remain alive and gradually accumulate because they are spawning faster than they are being removed, not because something is holding references to them.

And this is where we run into the current limitations of my debugger. I'm already working on an update where the mod will track entities based on which mod spawned them, so hopefully that will do the trick. Stay tuned!

smt923, Jul 28th at 5:37 PM
@El_Neuman: Based on what you posted, everything points to this not being a memory leak. The drifters are held by the vanilla EntityLedger, and their count is growing linearly (+1200 every 17 minutes), while no mod is growing proportionally. With a real memory leak,

i see, that definitely makes sense, I was hoping i could work out what was modifying or responsible for the extra spawns since it seems like a higher number than usual but yeah I suspect there isn't much I can do with the current tools, but that update definintely sounds good so i'll stay on the lookout for it

smt923, Jul 28th at 6:35 PM (modified Jul 28th at 6:38 PM)
@El_Neuman: Send me the full modpack as an archive, please :) Maybe I'll be able to immediately figure out what's causing that kind of mob spawning.

i've actually got it down to thinking it might be the 1.22 fork of OutlawMod, I believe it's doing EntityLedger stuff (ExpandedAiTasks.EntityLedger) and keeping hold of references but I'm still digging into it for now, it might be a weird interacton with other mods I have + that, but removing the mod basically stops the drifters from accumulating instantly so it's something related:

Spoiler!

28.7.2026 19:30:37 [Server Notification] -_-_-_- ServerDebugger: memory leak test -_-_-_-
  Despawned (canary)       : 374
  Survived full GC         : 57  (15.2%)
  Full GC took            : 6123.9 ms
  Managed heap            : 3283 MB -> 3245 MB
  -_-_-_- what exactly refuses to die -_-_-_-
       43  EntityAgent
       12  EntityFish
        2  EntitySentryRM
  VERDICT                  : NO MEMORY LEAK. Entities are being released correctly; the remainder consists of freshly despawned entities, which is expected.

 

28.7.2026 19:37:55 [Server Notification] -_-_-_- ServerDebugger: memory leak test -_-_-_-
  Despawned (canary)       : 1175
  Survived full GC         : 57  (4.9%)
  Full GC took            : 6013.0 ms
  Managed heap            : 3261 MB -> 3238 MB
  -_-_-_- what exactly refuses to die -_-_-_-
       43  EntityAgent
       12  EntityFish
        2  EntitySentryRM
  VERDICT                  : NO MEMORY LEAK. Entities are being released correctly; the remainder consists of freshly despawned entities, which is expected.

 

if you do still want the full mod pack though: https://we.tl/t-ge7A7kAPcVQOdh6i

El_Neuman , Jul 28th at 8:01 PM (modified Jul 28th at 8:03 PM)
@smt923: i've actually got it down to thinking it might be the 1.22 fork of OutlawMod, I believe it's doing EntityLedger stuff (ExpandedAiTasks.EntityLedger) and keeping hold of references but I'm still digging into it for now, it might be a weird interacton with

Install the new version and restart the server. You can immediately run /sdebug spawns on to start logging, and /sdebug spawns to view the results. Everything will be saved to serverdebugger-watchdog, so send me that file after the tests.

I also recently added tick logging. It probably won't be useful this time, but enable it anyway - I'm curious to see the results. It works the same way: /sdebug ticks on, and /sdebug ticks to view the results.

The fact that you've narrowed it down is awesome. Is that mod important to you? Does everything work fine without it?

smt923, Jul 28th at 8:34 PM
@El_Neuman: Install the new version and restart the server. You can immediately run /sdebug spawns on to start logging, and /sdebug spawns to view the results. Everything will be saved to serverdebugger-watchdog, so send me that file after the tests. I also recently

we can definitely skip the mod for now at least, i like the variety but after a long session the ram usage just climbs until we get paging which sucks

i put the mod back on to test the new version - the new modes are very useful, the spawns is very useful to see in general but does seem to be tied to in world drifters rather than the ones that are stuck in memory (but that still helps me nail it down to them not being properly spawned in world):

 

Outlaw mod on:

28.7.2026 21:16:53 [Server Notification] -_-_-_- ServerDebugger: memory leak test -_-_-_-
  Despawned (canary)       : 937
  Survived full GC         : 937  (100.0%)
  Full GC took            : 6404.6 ms
  Managed heap            : 3363 MB -> 3346 MB
  -_-_-_- what exactly refuses to die -_-_-_-
      362  EntityDrifter
      228  EntityDummySpellEffectsRM
      214  EntityAgent
       87  EntityShiver
       14  EntityButterfly
       12  EntityFish
        5  EntitySentryRM
        5  EntityItem
        5  EntityDroneRM
        4  EntityLocust
        1  EntityArmorStand
  VERDICT                  : MEMORY LEAK. Despawned entities are not collected by the GC - something is still holding references to them.

 

28.7.2026 21:17:43 [Server Notification] -_-_- Entity Spawn / Despawn Report -_-_-
  Observation time      : 592 s
 -_-_- Accumulation (Spawns - Despawns during the observation window) -_-_-
      Spawn | Despawn |     Net | Type
        46 |       26 | +     20 | EntityButterfly
       195 |      193 | +      2 | EntityAgent
        96 |       96 | +      0 | EntityShiver
         1 |        3 |      -2 | EntitySentryRM
         2 |        5 |      -3 | EntityDroneRM
       404 |      408 |      -4 | EntityDrifter
         0 |        4 |      -4 | EntityLocust
         0 |        5 |      -5 | EntityItem
         0 |      228 |    -228 | EntityDummySpellEffectsRM
  (A large positive 'Net' means this entity type is accumulating: more are spawning than despawning)
 -_-_- Who Is Spawning Them (Mod | Entity Type : Count) -_-_-
       388  Vanilla / Engine | EntityDrifter
       185  Vanilla / Engine | EntityAgent
        90  Vanilla / Engine | EntityShiver
        46  Vanilla / Engine | EntityButterfly
        16  Champion and Elite Mobs | EntityDrifter
        10  Champion and Elite Mobs | EntityAgent
         6  Champion and Elite Mobs | EntityShiver
         2  Vanilla / Engine | EntityDroneRM
         1  Vanilla / Engine | EntitySentryRM
  How to read this: find an entity type with a large '+Net' above, then locate it here. Better yet, send me the logs until proper documentation is available.
  In the 'Who Is Spawning Them' list, the left column shows the source mod.
  (Or 'Vanilla / Engine' if the game engine itself is spawning them according to normal spawn rules).

 

Outlaw mod off:

28.7.2026 21:31:26 [Server Notification] Handling Console Command /sdebug leak
28.7.2026 21:31:32 [Server Notification] -_-_-_- ServerDebugger: memory leak test -_-_-_-
  Despawned (canary)       : 599
  Survived full GC         : 0  (0.0%)
  Full GC took            : 6084.2 ms
  Managed heap            : 3260 MB -> 3256 MB
  VERDICT                  : NO MEMORY LEAK. Entities are being released correctly; there is no remainder at all.

28.7.2026 21:31:32 [Server Notification] -_-_-_- ServerDebugger: memory leak test -_-_-_-
  Despawned (canary)       : 599
  Survived full GC         : 0  (0.0%)
  Full GC took            : 6084.2 ms
  Managed heap            : 3260 MB -> 3256 MB
  VERDICT                  : NO MEMORY LEAK. Entities are being released correctly; there is no remainder at all.

 

28.7.2026 21:31:52 [Server Notification] Handling Console Command /sdebug spawns
28.7.2026 21:31:52 [Server Notification] -_-_- Entity Spawn / Despawn Report -_-_-
  Observation time      : 347 s
 -_-_- Accumulation (Spawns - Despawns during the observation window) -_-_-
      Spawn | Despawn |     Net | Type
        43 |       39 | +      4 | EntityButterfly
         1 |        0 | +      1 | EntityLocust
         1 |        0 | +      1 | EntityBell
         1 |        0 | +      1 | EntityBlockFalling
       288 |      287 | +      1 | EntityDrifter
         4 |        4 | +      0 | EntityDroneRM
        64 |       65 |      -1 | EntityShiver
       143 |      149 |      -6 | EntityAgent
  (A large positive 'Net' means this entity type is accumulating: more are spawning than despawning)
 -_-_- Who Is Spawning Them (Mod | Entity Type : Count) -_-_-
       276  Vanilla / Engine | EntityDrifter
       139  Vanilla / Engine | EntityAgent
        62  Vanilla / Engine | EntityShiver
        43  Vanilla / Engine | EntityButterfly
        12  Champion and Elite Mobs | EntityDrifter
         4  Champion and Elite Mobs | EntityAgent
         4  Vanilla / Engine | EntityDroneRM
         2  Champion and Elite Mobs | EntityShiver
         1  Vanilla / Engine | EntityBell
         1  Vanilla / Engine | EntityLocust
         1  Survival Mode | EntityBlockFalling
  How to read this: find an entity type with a large '+Net' above, then locate it here. Better yet, send me the logs until proper documentation is available.
  In the 'Who Is Spawning Them' list, the left column shows the source mod.
  (Or 'Vanilla / Engine' if the game engine itself is spawning them according to normal spawn rules).

just a tiny side note but the new commands if sent in game don't mirror to the console which is different to how `/sdebug leak` works (it prints both in game and back to the server console) not a huge deal but just incase it's something you wanted to change, either way ty for the help with all this

Runefire, Jul 20th at 12:36 PM

I tried out the sped-up garbage collection settings, but it's causing my server to crash on startup.

Crash Report
Game Version: v1.22.3 (Stable)
07/20/2026 12:18:48: Critical error occurred
Loaded Mods: 
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.<AllocateUninitializedArray>g__AllocateNewArrayWorker|77_0[T](Int32 length, Boolean pinned)
   at Vintagestory.API.Datastructures.FastMemoryStream.FastCopy(Byte[] buffer, Int32 oldLength, Int32 newSize) in VintagestoryApi\Datastructures\FastMemoryStream.cs:line 274
   at Vintagestory.API.Datastructures.FastMemoryStream.WriteByte(Byte p) in VintagestoryApi\Datastructures\FastMemoryStream.cs:line 159
   at Vintagestory.API.Common.GridRecipe.ToBytes(BinaryWriter writer) in VintagestoryApi\Common\Crafting\GridRecipe.cs:line 305
   at Vintagestory.Server.ServerMain.BuildServerAssetsPacket() in VintagestoryLib\Server\ServerMainNetworking.cs:line 1409
   at Vintagestory.API.Common.TyronThreadPool.<>c__DisplayClass11_0.<QueueTask>b__0(Object _) in VintagestoryApi\Common\TyronThreadPool.cs:line 119
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()
Game Version: v1.22.3 (Stable)
07/20/2026 12:19:29: Critical error occurred
Loaded Mods: 
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.<AllocateUninitializedArray>g__AllocateNewArrayWorker|77_0[T](Int32 length, Boolean pinned)
   at Vintagestory.API.Datastructures.FastMemoryStream.FastCopy(Byte[] buffer, Int32 oldLength, Int32 newSize) in VintagestoryApi\Datastructures\FastMemoryStream.cs:line 274
   at Vintagestory.API.Datastructures.FastMemoryStream.WriteByte(Byte p) in VintagestoryApi\Datastructures\FastMemoryStream.cs:line 159
   at Vintagestory.API.Common.GridRecipe.ToBytes(BinaryWriter writer) in VintagestoryApi\Common\Crafting\GridRecipe.cs:line 305
   at Vintagestory.Server.ServerMain.BuildServerAssetsPacket() in VintagestoryLib\Server\ServerMainNetworking.cs:line 1409
   at Vintagestory.API.Common.TyronThreadPool.<>c__DisplayClass11_0.<QueueTask>b__0(Object _) in VintagestoryApi\Common\TyronThreadPool.cs:line 119
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()
Game Version: v1.22.3 (Stable)
07/20/2026 12:21:56: Critical error occurred
Loaded Mods: 
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.<AllocateUninitializedArray>g__AllocateNewArrayWorker|77_0[T](Int32 length, Boolean pinned)
   at Vintagestory.API.Datastructures.FastMemoryStream.FastCopy(Byte[] buffer, Int32 oldLength, Int32 newSize) in VintagestoryApi\Datastructures\FastMemoryStream.cs:line 274
   at Vintagestory.API.Datastructures.FastMemoryStream.WriteByte(Byte p) in VintagestoryApi\Datastructures\FastMemoryStream.cs:line 159
   at Vintagestory.API.Common.GridRecipe.ToBytes(BinaryWriter writer) in VintagestoryApi\Common\Crafting\GridRecipe.cs:line 305
   at Vintagestory.Server.ServerMain.BuildServerAssetsPacket() in VintagestoryLib\Server\ServerMainNetworking.cs:line 1409
   at Vintagestory.API.Common.TyronThreadPool.<>c__DisplayClass11_0.<QueueTask>b__0(Object _) in VintagestoryApi\Common\TyronThreadPool.cs:line 119
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()
Game Version: v1.22.3 (Stable)
07/20/2026 12:22:35: Critical error occurred
Loaded Mods: 
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.<AllocateUninitializedArray>g__AllocateNewArrayWorker|77_0[T](Int32 length, Boolean pinned)
   at Vintagestory.API.Datastructures.FastMemoryStream.FastCopy(Byte[] buffer, Int32 oldLength, Int32 newSize) in VintagestoryApi\Datastructures\FastMemoryStream.cs:line 274
   at Vintagestory.API.Datastructures.FastMemoryStream.WriteByte(Byte p) in VintagestoryApi\Datastructures\FastMemoryStream.cs:line 159
   at Vintagestory.API.Common.GridRecipe.ToBytes(BinaryWriter writer) in VintagestoryApi\Common\Crafting\GridRecipe.cs:line 305
   at Vintagestory.Server.ServerMain.BuildServerAssetsPacket() in VintagestoryLib\Server\ServerMainNetworking.cs:line 1409
   at Vintagestory.API.Common.TyronThreadPool.<>c__DisplayClass11_0.<QueueTask>b__0(Object _) in VintagestoryApi\Common\TyronThreadPool.cs:line 119
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()
Game Version: v1.22.3 (Stable)
07/20/2026 12:28:26: Critical error occurred
Loaded Mods: 
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.<AllocateUninitializedArray>g__AllocateNewArrayWorker|77_0[T](Int32 length, Boolean pinned)
   at Vintagestory.Server.ServerMain.BuildServerAssetsPacket() in VintagestoryLib\Server\ServerMainNetworking.cs:line 1409
   at Vintagestory.API.Common.TyronThreadPool.<>c__DisplayClass11_0.<QueueTask>b__0(Object _) in VintagestoryApi\Common\TyronThreadPool.cs:line 119
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()
Game Version: v1.22.3 (Stable)
07/20/2026 12:29:06: Critical error occurred
Loaded Mods: 
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.<AllocateUninitializedArray>g__AllocateNewArrayWorker|77_0[T](Int32 length, Boolean pinned)
   at Vintagestory.API.Datastructures.FastMemoryStream.FastCopy(Byte[] buffer, Int32 oldLength, Int32 newSize) in VintagestoryApi\Datastructures\FastMemoryStream.cs:line 274
   at Vintagestory.API.Datastructures.FastMemoryStream.WriteByte(Byte p) in VintagestoryApi\Datastructures\FastMemoryStream.cs:line 159
   at Vintagestory.API.Common.GridRecipe.ToBytes(BinaryWriter writer) in VintagestoryApi\Common\Crafting\GridRecipe.cs:line 305
   at Vintagestory.Server.ServerMain.BuildServerAssetsPacket() in VintagestoryLib\Server\ServerMainNetworking.cs:line 1409
   at Vintagestory.API.Common.TyronThreadPool.<>c__DisplayClass11_0.<QueueTask>b__0(Object _) in VintagestoryApi\Common\TyronThreadPool.cs:line 119
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()
Game Version: v1.22.3 (Stable)
07/20/2026 12:32:54: Critical error occurred
Loaded Mods: 
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at CitoMemoryStream.FastCopy(Byte[] buffer, Int32 oldLength, Int32 newSize) in VintagestoryLib\Common\Network\Packets.Serializer.cs:line 788
   at CitoMemoryStream.EnsureCapacityFor(Int32 count) in VintagestoryLib\Common\Network\Packets.Serializer.cs:line 739
   at CitoMemoryStream.WriteString(String s, Int32 byteCount) in VintagestoryLib\Common\Network\Packets.Serializer.cs:line 828
   at ProtocolParser.WriteString(CitoStream stream, String s) in VintagestoryLib\Common\Network\Packets.Serializer.cs:line 55
   at Packet_BlockTypeSerializer.Serialize(CitoStream stream, Packet_BlockType instance) in VintagestoryLib\Common\Network\Packets.Serializer.cs:line 13897
   at Packet_BlockTypeSerializer.SerializeWithSize(CitoStream stream, Packet_BlockType instance) in VintagestoryLib\Common\Network\Packets.Serializer.cs:line 14697
   at Packet_ServerAssetsSerializer.Serialize(CitoStream stream, Packet_ServerAssets instance) in VintagestoryLib\Common\Network\Packets.Serializer.cs:line 20800
   at Packet_ServerAssetsSerializer.SerializeWithSize(CitoStream stream, Packet_ServerAssets instance) in VintagestoryLib\Common\Network\Packets.Serializer.cs:line 20907
   at Packet_ServerSerializer.Serialize(CitoStream stream, Packet_Server instance) in VintagestoryLib\Common\Network\Packets.Serializer.cs:line 18462
   at Vintagestory.Server.ServerMain.BuildServerAssetsPacket() in VintagestoryLib\Server\ServerMainNetworking.cs:line 1548
   at Vintagestory.API.Common.TyronThreadPool.<>c__DisplayClass11_0.<QueueTask>b__0(Object _) in VintagestoryApi\Common\TyronThreadPool.cs:line 119
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()
Game Version: v1.22.3 (Stable)
07/20/2026 12:33:37: Critical error occurred
Loaded Mods: 
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.<AllocateUninitializedArray>g__AllocateNewArrayWorker|77_0[T](Int32 length, Boolean pinned)
   at Vintagestory.API.Datastructures.FastMemoryStream.FastCopy(Byte[] buffer, Int32 oldLength, Int32 newSize) in VintagestoryApi\Datastructures\FastMemoryStream.cs:line 274
   at Vintagestory.API.Datastructures.FastMemoryStream.WriteByte(Byte p) in VintagestoryApi\Datastructures\FastMemoryStream.cs:line 159
   at Vintagestory.API.Common.GridRecipe.ToBytes(BinaryWriter writer) in VintagestoryApi\Common\Crafting\GridRecipe.cs:line 305
   at Vintagestory.Server.ServerMain.BuildServerAssetsPacket() in VintagestoryLib\Server\ServerMainNetworking.cs:line 1409
   at Vintagestory.API.Common.TyronThreadPool.<>c__DisplayClass11_0.<QueueTask>b__0(Object _) in VintagestoryApi\Common\TyronThreadPool.cs:line 119
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()
Crash Report
Game Version: v1.22.3 (Stable)
07/20/2026 12:18:48: Critical error occurred
Loaded Mods: 
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.<AllocateUninitializedArray>g__AllocateNewArrayWorker|77_0[T](Int32 length, Boolean pinned)
   at Vintagestory.API.Datastructures.FastMemoryStream.FastCopy(Byte[] buffer, Int32 oldLength, Int32 newSize) in VintagestoryApi\Datastructures\FastMemoryStream.cs:line 274
   at Vintagestory.API.Datastructures.FastMemoryStream.WriteByte(Byte p) in VintagestoryApi\Datastructures\FastMemoryStream.cs:line 159
   at Vintagestory.API.Common.GridRecipe.ToBytes(BinaryWriter writer) in VintagestoryApi\Common\Crafting\GridRecipe.cs:line 305
   at Vintagestory.Server.ServerMain.BuildServerAssetsPacket() in VintagestoryLib\Server\ServerMainNetworking.cs:line 1409
   at Vintagestory.API.Common.TyronThreadPool.<>c__DisplayClass11_0.<QueueTask>b__0(Object _) in VintagestoryApi\Common\TyronThreadPool.cs:line 119
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()
Game Version: v1.22.3 (Stable)
07/20/2026 12:19:29: Critical error occurred
Loaded Mods: 
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.<AllocateUninitializedArray>g__AllocateNewArrayWorker|77_0[T](Int32 length, Boolean pinned)
   at Vintagestory.API.Datastructures.FastMemoryStream.FastCopy(Byte[] buffer, Int32 oldLength, Int32 newSize) in VintagestoryApi\Datastructures\FastMemoryStream.cs:line 274
   at Vintagestory.API.Datastructures.FastMemoryStream.WriteByte(Byte p) in VintagestoryApi\Datastructures\FastMemoryStream.cs:line 159
   at Vintagestory.API.Common.GridRecipe.ToBytes(BinaryWriter writer) in VintagestoryApi\Common\Crafting\GridRecipe.cs:line 305
   at Vintagestory.Server.ServerMain.BuildServerAssetsPacket() in VintagestoryLib\Server\ServerMainNetworking.cs:line 1409
   at Vintagestory.API.Common.TyronThreadPool.<>c__DisplayClass11_0.<QueueTask>b__0(Object _) in VintagestoryApi\Common\TyronThreadPool.cs:line 119
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()
Game Version: v1.22.3 (Stable)
07/20/2026 12:21:56: Critical error occurred
Loaded Mods: 
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.<AllocateUninitializedArray>g__AllocateNewArrayWorker|77_0[T](Int32 length, Boolean pinned)
   at Vintagestory.API.Datastructures.FastMemoryStream.FastCopy(Byte[] buffer, Int32 oldLength, Int32 newSize) in VintagestoryApi\Datastructures\FastMemoryStream.cs:line 274
   at Vintagestory.API.Datastructures.FastMemoryStream.WriteByte(Byte p) in VintagestoryApi\Datastructures\FastMemoryStream.cs:line 159
   at Vintagestory.API.Common.GridRecipe.ToBytes(BinaryWriter writer) in VintagestoryApi\Common\Crafting\GridRecipe.cs:line 305
   at Vintagestory.Server.ServerMain.BuildServerAssetsPacket() in VintagestoryLib\Server\ServerMainNetworking.cs:line 1409
   at Vintagestory.API.Common.TyronThreadPool.<>c__DisplayClass11_0.<QueueTask>b__0(Object _) in VintagestoryApi\Common\TyronThreadPool.cs:line 119
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()
Game Version: v1.22.3 (Stable)
07/20/2026 12:22:35: Critical error occurred
Loaded Mods: 
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.<AllocateUninitializedArray>g__AllocateNewArrayWorker|77_0[T](Int32 length, Boolean pinned)
   at Vintagestory.API.Datastructures.FastMemoryStream.FastCopy(Byte[] buffer, Int32 oldLength, Int32 newSize) in VintagestoryApi\Datastructures\FastMemoryStream.cs:line 274
   at Vintagestory.API.Datastructures.FastMemoryStream.WriteByte(Byte p) in VintagestoryApi\Datastructures\FastMemoryStream.cs:line 159
   at Vintagestory.API.Common.GridRecipe.ToBytes(BinaryWriter writer) in VintagestoryApi\Common\Crafting\GridRecipe.cs:line 305
   at Vintagestory.Server.ServerMain.BuildServerAssetsPacket() in VintagestoryLib\Server\ServerMainNetworking.cs:line 1409
   at Vintagestory.API.Common.TyronThreadPool.<>c__DisplayClass11_0.<QueueTask>b__0(Object _) in VintagestoryApi\Common\TyronThreadPool.cs:line 119
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()
Game Version: v1.22.3 (Stable)
07/20/2026 12:28:26: Critical error occurred
Loaded Mods: 
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.<AllocateUninitializedArray>g__AllocateNewArrayWorker|77_0[T](Int32 length, Boolean pinned)
   at Vintagestory.Server.ServerMain.BuildServerAssetsPacket() in VintagestoryLib\Server\ServerMainNetworking.cs:line 1409
   at Vintagestory.API.Common.TyronThreadPool.<>c__DisplayClass11_0.<QueueTask>b__0(Object _) in VintagestoryApi\Common\TyronThreadPool.cs:line 119
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()
Game Version: v1.22.3 (Stable)
07/20/2026 12:29:06: Critical error occurred
Loaded Mods: 
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.<AllocateUninitializedArray>g__AllocateNewArrayWorker|77_0[T](Int32 length, Boolean pinned)
   at Vintagestory.API.Datastructures.FastMemoryStream.FastCopy(Byte[] buffer, Int32 oldLength, Int32 newSize) in VintagestoryApi\Datastructures\FastMemoryStream.cs:line 274
   at Vintagestory.API.Datastructures.FastMemoryStream.WriteByte(Byte p) in VintagestoryApi\Datastructures\FastMemoryStream.cs:line 159
   at Vintagestory.API.Common.GridRecipe.ToBytes(BinaryWriter writer) in VintagestoryApi\Common\Crafting\GridRecipe.cs:line 305
   at Vintagestory.Server.ServerMain.BuildServerAssetsPacket() in VintagestoryLib\Server\ServerMainNetworking.cs:line 1409
   at Vintagestory.API.Common.TyronThreadPool.<>c__DisplayClass11_0.<QueueTask>b__0(Object _) in VintagestoryApi\Common\TyronThreadPool.cs:line 119
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()
Game Version: v1.22.3 (Stable)
07/20/2026 12:32:54: Critical error occurred
Loaded Mods: 
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at CitoMemoryStream.FastCopy(Byte[] buffer, Int32 oldLength, Int32 newSize) in VintagestoryLib\Common\Network\Packets.Serializer.cs:line 788
   at CitoMemoryStream.EnsureCapacityFor(Int32 count) in VintagestoryLib\Common\Network\Packets.Serializer.cs:line 739
   at CitoMemoryStream.WriteString(String s, Int32 byteCount) in VintagestoryLib\Common\Network\Packets.Serializer.cs:line 828
   at ProtocolParser.WriteString(CitoStream stream, String s) in VintagestoryLib\Common\Network\Packets.Serializer.cs:line 55
   at Packet_BlockTypeSerializer.Serialize(CitoStream stream, Packet_BlockType instance) in VintagestoryLib\Common\Network\Packets.Serializer.cs:line 13897
   at Packet_BlockTypeSerializer.SerializeWithSize(CitoStream stream, Packet_BlockType instance) in VintagestoryLib\Common\Network\Packets.Serializer.cs:line 14697
   at Packet_ServerAssetsSerializer.Serialize(CitoStream stream, Packet_ServerAssets instance) in VintagestoryLib\Common\Network\Packets.Serializer.cs:line 20800
   at Packet_ServerAssetsSerializer.SerializeWithSize(CitoStream stream, Packet_ServerAssets instance) in VintagestoryLib\Common\Network\Packets.Serializer.cs:line 20907
   at Packet_ServerSerializer.Serialize(CitoStream stream, Packet_Server instance) in VintagestoryLib\Common\Network\Packets.Serializer.cs:line 18462
   at Vintagestory.Server.ServerMain.BuildServerAssetsPacket() in VintagestoryLib\Server\ServerMainNetworking.cs:line 1548
   at Vintagestory.API.Common.TyronThreadPool.<>c__DisplayClass11_0.<QueueTask>b__0(Object _) in VintagestoryApi\Common\TyronThreadPool.cs:line 119
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()
Game Version: v1.22.3 (Stable)
07/20/2026 12:33:37: Critical error occurred
Loaded Mods: 
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.AllocateNewArray(IntPtr typeHandlePtr, Int32 length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret)
   at System.GC.<AllocateUninitializedArray>g__AllocateNewArrayWorker|77_0[T](Int32 length, Boolean pinned)
   at Vintagestory.API.Datastructures.FastMemoryStream.FastCopy(Byte[] buffer, Int32 oldLength, Int32 newSize) in VintagestoryApi\Datastructures\FastMemoryStream.cs:line 274
   at Vintagestory.API.Datastructures.FastMemoryStream.WriteByte(Byte p) in VintagestoryApi\Datastructures\FastMemoryStream.cs:line 159
   at Vintagestory.API.Common.GridRecipe.ToBytes(BinaryWriter writer) in VintagestoryApi\Common\Crafting\GridRecipe.cs:line 305
   at Vintagestory.Server.ServerMain.BuildServerAssetsPacket() in VintagestoryLib\Server\ServerMainNetworking.cs:line 1409
   at Vintagestory.API.Common.TyronThreadPool.<>c__DisplayClass11_0.<QueueTask>b__0(Object _) in VintagestoryApi\Common\TyronThreadPool.cs:line 119
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()

I see that's it's giving an out-of-memory error, but I watched it like a hawk the second time around and it never got close to my memory limit. The server itself acknowledged that in the console too:

[WinterNode] Server marked as OFF
[WinterNode] ---------- Detected server process in a crashed state! ----------
[WinterNode] Exit code: 0
[WinterNode] Out of Memory: false
[WinterNode] Aborting automatic reboot due to crash within the last 60 seconds

Any ideas as to what's going wrong here?

El_Neuman , Jul 20th at 2:46 PM
@Runefire: I tried out the sped-up garbage collection settings, but it's causing my server to crash on startup. Crash Report Game Version: v1.22.3 (Stable)07/20/2026 12:18:48: Critical error occurredLoaded Mods: System.OutOfMemoryException: Exception of type 'System

You're partly right - but the issue isn't caused by the mod's code, it's caused by the recommendation in its description. You added the HeapHardLimitPercent: 30 line following the debugger's setup instructions, and that's what's imposing a very restrictive memory limit. The mod itself isn't even running when a player joins - the entire stack trace is vanilla, where the game is processing recipes from your 129 installed mods. The debugger doesn't appear anywhere in the stack.

It's easy to verify: remove the HeapHardLimitPercent line and the crash will disappear while the mod continues to work normally. On the other hand, if you remove the mod but keep that line, the server will still crash. That means the problem is the configuration, not the mod itself.

This was my oversight in the documentation. I recommended a value of 30% because it works well for my own server, but it's too low for a large modpack. I'm already updating the instructions. Sorry for the inconvenience.

Geobeetle, Jul 20th at 5:26 AM

I think this mod needs more time in the oven but what I'm seeing so far sounds great! If I could request a feature it would be more options for diagnosing freezing or hardware load due to mods as we don't really have anything for that in vintagestory as of yet.

Fefa, Jul 20th at 2:08 AM

i noticed the first report works, but then it takes over the chat and no more notification is sent to me in the chat no matter what command i use. I am missing something? i play Single player open to lan

Mulciber, Jul 20th at 12:53 AM

First, I promise you I read the description that this is for server owners. 😁  I just want to make absolutely sure as a single player, this won't work for me.  I would love a tool that does precisely this--helps me track down why I have stutters and freezes by specifically calling out the mod responsible.  I don't have the energy to turn off all 129 of my mods, add half back, etc. to track things down.  Thank you as always for your hard work!

Stason4ikRU, Jul 19th at 7:47 PM (modified Jul 19th at 9:05 PM)

что такое /xswd profile on и куда писать это? в косноль и чат не пишется 

Stason4ikRU, Jul 19th at 7:51 PM
@Stason4ikRU: что такое /xswd profile on и куда писать это? в косноль и чат не пишется

и в это ? ВЕРДИКТ              : ИНДУЦИРОВАННАЯ сборка - кто-то явно позвал GC.Collect(). /xswd gchook on -> /xswd gccallers. 

El_Neuman , Jul 19th at 11:04 PM
@Stason4ikRU: и в это ? ВЕРДИКТ : ИНДУЦИРОВАННАЯ сборка - кто-то явно позвал GC.Collect(). /xswd gchook on -> /xswd gccallers.

Привет Стасончик, мой косяк. Я обновил всё, но только не локализацию, юзай команду /sdebug profile on и /sdebug gchook on, /xswd устаревшая команда :(

Stason4ikRU, Jul 20th at 4:06 PM
@El_Neuman: Привет Стасончик, мой косяк. Я обновил всё, но только не локализацию, юзай команду /sdebug profile on и /sdebug gchook on, /xswd устаревшая команда :(

Привет, понял, теперь другая проблема.. Пока я был на работе сервер раз 10 выключался, всё что я сделал вчера это добавил этот мод и внес строки 

"System.GC.Server": true,
"System.GC.Concurrent": true,
"System.GC.HeapCount": 6 

Строк было 4 и я не помню какая была 4 но там было что то связано с процентами. И я поставил 18 вместо 30. Как понимаю в это строке и была проблема, поэтому её и нет в примере? 

Stason4ikRU, Jul 20th at 4:54 PM (modified Jul 20th at 5:34 PM)
@El_Neuman: Да, мой прокол, я не подумал о том, что у вас может быть другая нагрузка, я удалил это из инструкции, простите 😯

И я сегодня решил на работе на смотреть состояние сервера через хостинг xD 
Тут моя ошибка я обычно смотрю за состоянием сервака, особенно если что то новое добавляю, а тут забыл вообще. 

CTAKAHOB, Jul 19th at 8:13 AM (modified Jul 19th at 8:21 AM)

Кратко

Server Debugger v1.0.0 подхватывается сервером, но падает при StartServerSide на регистрации команд. Система ServerDebuggerSystem не стартует, команды мода недоступны.

Spoiler

Окружение

  • Игра: Vintage Story v1.22.3 (Stable), API v1.22.0

  • ОС: Linux (Ubuntu), выделенный сервер

  • Мод: ServerDebugger v1.0.0 (serverdebugger)

  • Файл: ServerDebugger v1.0.0.zip

 

Воспроизведение

  1. Положить zip в Mods на сервере.

  2. Запустить dedicated server 1.22.x.

  3. Открыть server-main.log.

 

Ожидание

Мод стартует, работают /debug env, /debug stalls, /debug leak и т.д.

Факт

DLL находится, мод есть в dependency list, но:

[Error] [serverdebugger] Exception: Command with such name already exists
   at ChatCommandApi.Create(String commandName)
   at ServerDebuggerSystem.RegisterCommands() ...:line 1679
   at ServerDebuggerSystem.StartServerSide(...) ...:line 199
[Error] Failed to start system ServerDebugger.Diagnostics.ServerDebuggerSystem

Повторяется на двух перезапусках подряд.

Причина

Мод регистрирует корневую команду debug, а ваниль уже занимает /debug: https://wiki.vintagestory.at/List_of_server_commands/debug

В ChatCommand API повторный Create("debug") кидает исключение → весь старт системы мода обрывается.

Предложение

  • Переименовать корень, например /sdebug / /srvdebug / /serverdebugger, или

  • Вешать subcommands на существующий ванильный /debug (если API это позволяет), или

  • Сделать имя корневой команды настраиваемым в конфиге.

Можем быстро перепроверить фикс на нашем 1.22.3 сервере.