Network Thread Hitches Causing Mass Timeouts at ~300 Players – Trace Files Included
What happened?
We are experiencing recurring network thread hitches and mass player timeouts, particularly when the server reaches around 300 concurrent players.
SERVER SPECIFICATIONS / ENVIRONMENT
OS: Windows Server 2019 CPU: AMD Ryzen 9 9950X3D Network: 10 Gbps inbound / outbound Game: FiveM / FXServer OneSync: Enabled Player Count: Approximately 300 when the issue occurs Database: External managed MySQL Voice: Hosted separately on an external voice server FXServer Artifact: 35574
ISSUE
The server generally operates normally until we reach approximately 300 concurrent players.
When the issue occurs, we start seeing repeated warnings such as:
network thread hitch warning: timer interval of XXX milliseconds
This is followed by a large number of players disconnecting with:
Server->client connection timed out
During a severe occurrence, the server can drop from approximately 300 players to only a small number of remaining players within a very short period of time.
FXServer itself does NOT necessarily crash. The process can remain online and continue running, but a large portion of the connected players time out simultaneously.
We have already investigated the hosting/network side, upgraded to 10 Gbps networking, made multiple codebase/performance changes, and moved voice traffic to a completely separate voice server.
However, the issue can still occur at higher player counts.
TRACE FILES https://drive.google.com/file/d/1Dx9gBVl0WHySu6F90Bd3LH8n0XGeGNxj/view?usp=sharing https://drive.google.com/file/d/1PYPtKXSyMwAJSKWpNIkdJbSb5BTARiY5/view?usp=sharing https://drive.google.com/file/d/1ULdg_Uko5YkMw3GoIJ43efDtcq4fQ4bz/view?usp=sharing
IMPORTANT NOTE ABOUT THE TRACES
These traces were NOT captured during the exact moment of the mass timeout.
The issue happens very suddenly, and unfortunately we have not been able to have tracing running at the exact moment it occurs.
These traces were captured close to and/or shortly after the incidents, while the server was still experiencing or recovering from network hitches.
We are providing all three traces in case they contain useful indicators of what is happening to the network thread around the time of the incident.
WHAT WE ARE TRYING TO DETERMINE
-
What could be causing the network thread to stall/hitch at higher player counts?
-
Is there anything in these traces indicating a specific resource, server event, native, networking operation, or internal FXServer function consuming excessive network-thread time?
-
Could a resource or large/repeated network event cause this behavior even if the main server thread itself is not hitching?
-
Is there a recommended way to continuously capture the relevant profiling information so we can catch the exact moment the mass timeout occurs?
Any help identifying suspicious activity in these traces, or guidance on what additional profiling/debugging data we should capture, would be greatly appreciated.
Expected result
What could be causing the network thread to stall/hitch at higher player counts?
Reproduction steps
Any help identifying suspicious activity in these traces, or guidance on what additional profiling/debugging data we should capture, would be greatly appreciated.
Importancy
Crash
Area(s)
FiveM
Specific version(s)
Fivem, Window 2019
Additional information
No response
I don't think an .etl file will give us the answer. Try using "profiler record 2500" in the console during peak hours; once the console indicates it has finished (this will take about 1–2 minutes), type "profiler saveJSON my_file". The output will be saved in the root folder where the database startup .bat file is located. Please send it to us.
Does it happen on artifact 25770 ? Do you use latent events ?
I tried 25770 and it still mass timeout, tried with and without lanten it still timeout, right now im on 25770 and no latent and it also timeout @manzarek123
Honestly, I don't think this is an FXServer core issue at all. We manage servers running 400+ concurrent players smoothly without ever seeing these network thread stalls or mass disconnects. If this were actually a bug in the core binaries, pretty much every major community running high slot counts would be complaining about the exact same thing right now.
When the server stays up but drops everyone with timeout errors, the network thread (uv_run) is getting choked somewhere else. In our experience, it almost always comes down to bad scripts or host-level networking:
- Broadcast events with heavy payloads: Double-check your scripts for any
TriggerClientEvent(..., -1, ...). If someone pushes even 20–50 KB to all 300 players at once, you're suddenly dumping megabytes into the UDP outbound queue in a single tick. That immediately stalls the network loop, packets drop, and ENet just resets the connections. - State bag spam: Any loop or tick updating entity/global state bags constantly? With 300 clients, unthrottled state bag writes will completely swamp the sync pipeline.
- Windows UDP drops & NIC drivers: On Windows Server with a 10G link, make sure you're not using generic Microsoft network drivers. Also, keep an eye on Windows Performance Monitor (
Datagrams Discarded / sec) or runnetstat -s -p udpright after an incident. If the OS UDP buffers overflow during a traffic spike, Windows silently drops packets before FXServer even gets to touch them. - Hoster-side rate limiting: Around 300 players, the PPS (packets per second) spike can easily trigger aggressive automated DDoS/flood protection at the host or edge firewall level, which will just drop UDP bursts.
I’d strongly suggest wrapping TriggerClientEvent server-side to log whenever -1 gets called with large payloads, and checking your per-resource network usage (resmon). FXServer easily handles 300+ players out of the box if the resource traffic is kept clean.
I tried 25770 and it still mass timeout, tried with and without lanten it still timeout, right now im on 25770 and no latent and it also timeout @manzarek123
If you need help don't hesitate to ping me on discord maybe i could help u :) spacev on discord
Looks like a you issue
I added you @spacevx
Greetings anvu23198
I was checking the fivem github and saw your comment on #4202 about the network thread hitches and mass timeouts when you reach around 300 players Not sure if you solved it yet
Im Yassine and fixing lag and timeouts on FiveM and RedM servers is what I do Happy to check your setup free of charge and tell you if its network side or server side
My discord is knoxz7 just send me a message