
Vintage Story Mod DB · Vintage Story mod
Server Debugger
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
Quick answer
Which Server Debugger release should I use?
Server Debugger 1.0.4-rc.1 targets 1.22.0-pre.1, 1.22.0-pre.2, 1.22.0-pre.3. It must be installed on the client. Installation on the dedicated server is optional. No extra mods listed for this file.
Where it goes
Is Server Debugger required on the client, server, or both?
It must be installed on the client. Installation on the dedicated server is optional.
This release supports both sides, but the source does not require it on the server.
What else does Server Debugger 1.0.4-rc.1 need?
1.0.4-rc.1. Change the file and its required mods may change too.
This file does not list any required mods. Do not add a library just because a different file uses it.
This file does not list any required or optional mods.
Before you install it
Add Server Debugger without breaking your instance.
Built for Server Debugger 1.0.4-rc.1. Pick another file and the loader, install side or required mods may change.
- 01
Stick to this file
Use 1.0.4-rc.1. It targets 1.22.0-pre.1, 1.22.0-pre.2, 1.22.0-pre.3; another release may have different loader, side or dependency requirements.
- 02
Bring the mods it needs
This file does not list any required mods. Do not add a library just because a different file uses it.
- 03
Put it on the correct side
It must be installed on the client. Installation on the dedicated server is optional.
- 04
Pick the file you checked
Use the “Get this file” button beside 1.0.4-rc.1. It opens that exact file at the source.
About this project
What does Server Debugger add?
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"
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?
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
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:
- Performs a manual garbage collection (the server may freeze for a few seconds).
- Finds all the dead mobs that someone is still holding.
- Traces who exactly is holding them, and through which mod this reference goes.
- 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
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
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)
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
- Through the hosting file manager, find the file
VintagestoryServer.runtimeconfig.json(located next to the server itself). - First, make a copy of it - in case something goes wrong, you can revert it back.
- 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
}
}
}
- 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.
- 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.
Project description from Vintage Story Mod DB.
Pick your setup
Server Debugger releases for each Vintage Story version.
Choose the version and loader you play, then open the matching release.
1.22.4
1 loader build1.22.3
1 loader build1.22.2
1 loader build1.22.1
1 loader build1.22.0-rc.10
1 loader build1.22.0-rc.9
1 loader build1.22.0-rc.8
1 loader build1.22.0-rc.7
1 loader build1.22.0-rc.6
1 loader build1.22.0-rc.5
1 loader build1.22.0-rc.4
1 loader buildShowing the newest 12 of 21 game versions. Older files are in the list below.
Check the dependencies, then try the file in a copied instance before changing a world you care about.
Recent files
Server Debugger versions and loaders
1.0.4-rc.1
Server Debugger v1.0.4-rc.1.zip
28 Jul 2026
1.0.3
Server Debugger v1.0.3.zip
20 Jul 2026
1.0.2
Server Debugger v1.0.2.zip
20 Jul 2026
1.0.1
Server Debugger v1.0.1.zip
19 Jul 2026
1.0.0
ServerDebugger v1.0.0.zip
18 Jul 2026
Looking for an older file? The official Vintage Story Mod DB project page is in Resources.