We finished up porting our server code from CFX to FXServer (artifact 300), running on Linux, after the “threadsafe” fix was implemented as per [FXServer] Random error(s)
Testing with ~10 people doing random tasks on the server worked well, so we pushed to production today.
It did not go well.
Trying to run a production server with 32 slots failed with laggy commands, in-game world state, and instancing.
Our dedicated (non-VPS) hardware is practically asleep, and players were reporting extremely high lag. Many players were timing out, the server never quite reached capacity (32 of 32 players), and many players were getting randomly instanced. I was on the server, but but did not experience too much interruption and did not get instanced myself.
The MySQL database server has extremely low load as well.
Running CFX server has none of these problems on the same hardware.
Our players come from all over the world, and some have very poor, low-bandwidth connections.
One item in the logs caught my attention: the number of vouches. This is really suspect to me.
Extracted from the logs:
Received a vouch for Prion, they have 2 vouches and need 87810.
Received a vouch for Bella, they have 2 vouches and need 87812.
Received a vouch for Ricky, they have 2 vouches and need 26.
Received a vouch for SirSleepyEyes, they have 2 vouches and need 87812.
Received a vouch for Mindless, they have 2 vouches and need 87809.
Received a vouch for KTGgaming6666, they have 2 vouches and need 87809.
Received a vouch for UglierGoblino, they have 2 vouches and need 87808.
Received a vouch for Rekan Martinez, they have 2 vouches and need 27.
Received a vouch for Anando, they have 2 vouches and need 87807.
Received a vouch for Bubis, they have 2 vouches and need 87807.
Received a vouch for M_tt, they have 2 vouches and need 87806.
Received a vouch for Mindless, they have 2 vouches and need 43.
Received a vouch for gnosis., they have 2 vouches and need 87808.
Received a vouch for FarmTheGamer, they have 2 vouches and need 22.
Received a vouch for UglierGoblino, they have 2 vouches and need 87810.
Received a vouch for Fortimbraz, they have 2 vouches and need 20.
Received a vouch for AndyyCampbell, they have 2 vouches and need 87808.
Received a vouch for Addylad™, they have 2 vouches and need 87810.
Received a vouch for redwolfmoon99, they have 2 vouches and need 87809.
Received a vouch for FarmTheGamer, they have 2 vouches and need 87809.
Received a vouch for Ricky, they have 2 vouches and need 87809.
Received a vouch for Ricky, they have 2 vouches and need 87809.
Received a vouch for redwolfmoon99, they have 2 vouches and need 87810.
Received a vouch for Dishes, they have 2 vouches and need 87810.
Received a vouch for Zephahniah, they have 2 vouches and need 87809.
Received a vouch for Dishes, they have 2 vouches and need 87809.
Received a vouch for Prion, they have 2 vouches and need 87808.
Got a late vouch for acidshadow - they're the current arbitrator!
Got a late vouch for acidshadow - they're the current arbitrator!
Got a late vouch for acidshadow - they're the current arbitrator!
Got a late vouch for acidshadow - they're the current arbitrator!
Got a late vouch for acidshadow - they're the current arbitrator!
Got a late vouch for acidshadow - they're the current arbitrator!
Got a late vouch for acidshadow - they're the current arbitrator!
Got a late vouch for acidshadow - they're the current arbitrator!
Got a late vouch for acidshadow - they're the current arbitrator!
Got a late vouch for acidshadow - they're the current arbitrator!
Got a late vouch for acidshadow - they're the current arbitrator!
Got a late vouch for acidshadow - they're the current arbitrator!
Got a late vouch for acidshadow - they're the current arbitrator!
Got a late vouch for acidshadow - they're the current arbitrator!
Got a late vouch for acidshadow - they're the current arbitrator!
Got a late vouch for acidshadow - they're the current arbitrator!
Got a late vouch for acidshadow - they're the current arbitrator!
Got a late vouch for acidshadow - they're the current arbitrator!
Got a late vouch for acidshadow - they're the current arbitrator!
Got a late vouch for acidshadow - they're the current arbitrator!
Got a late vouch for acidshadow - they're the current arbitrator!
Got a late vouch for acidshadow - they're the current arbitrator!
Got a late vouch for acidshadow - they're the current arbitrator!
Got a late vouch for acidshadow - they're the current arbitrator!
Got a late vouch for acidshadow - they're the current arbitrator!
Got a late vouch for acidshadow - they're the current arbitrator!
Received a vouch for redwolfmoon99, they have 2 vouches and need 87808.
Received a vouch for FarmTheGamer, they have 2 vouches and need 87808.
Received a vouch for redwolfmoon99, they have 2 vouches and need 87806.
Received a vouch for redwolfmoon99, they have 2 vouches and need 87806.
87806 seems like an extreme number of vouches required. Ricky (near the top) only needed 26, which seems reasonable and that was approximately the maximum number of players the server got up to.
Everyone in the list above got instanced at some point during the test.
What also bothers me is the extremely high values of “hitch” times, both in frequency and number of milliseconds.
We are using fivem-mysql-async, with 27 Sync and 128 Async statements (82% async).
There are a few minor tracebacks in the server log, but I don’t think they are absolutely critical. We had some minor functionality degredation (some custom chat-based commands wouldn’t work, some would after trying again, and some would simply lag in processing).
On the client, we had many and frequent instances of crashes when calling GetSoundId().
Starting the server took several tries in the beginning, which printed huge tracebacks, which I think happened in native code, but the server stayed running on the 4th try. I can try to reproduce that, but the log for those rounds were lost. No netgraphs are available. I would hate to push the server live to get the native crashes and netgraphs, but we might have to, depending on feedback received here.
Full (anonymized) server log here:
Issues: lag, desync, instancing
Additional text for forum searches: instance, instanced, timeout, time out, disconnect, disconnection, disconnected