Expected Behavior
Players should be able to switch servers without timing out
Actual Behavior
Sometimes players are randomly stuck inbetween the PlayerEnterConfigurationEvent and PlayerEnteredConfigurationEvent when switching between servers.
They do enter the "Reconfiguring"-phase clientwise, but Velocity seems to never actually put them into the reconfig phase, leading to them timing out. See below for what I tried for debugging.
Steps to Reproduce
This happens randomly for some (but not all) players, both vanilla users and people with mods. It doesn't happen everytime, just rarely.
For debugging, I have listened on Velocity to all the config events, and the PlayerEnterConfigurationEvent is fired. I then dug into client's NMS and added logging there too (primarily in (mojang mapped) ClientPacketListener#handleLogin and ClientPacketListener#handleConfigurationStart):
Client log when the timeout happened: https://mclo.gs/kU6CX7m
Proxy log when the timeout happened: https://mclo.gs/sDcebap
Client log of the same player, a few minutes earlier, when everything went fine: https://mclo.gs/DCRbJiY
Proxy log when it went fine: https://mclo.gs/blpS1hN
As you can see in the first two logs, the client enters the configuration phase as expected, and then sends the ServerboundConfigurationAcknowledgedPacket - this should result in Velocity firing the PlayerEnteredConfigurationEvent (if I'm not mistaken), which did not happen.
Plugin List
Velocity:
[09:16:35 INFO]: Plugins: velocity, floodgate, geyserutils, litebans, luckperms, nuvotifier, openaudiomc, primecore, primeappplugin, primediscord, primelaby, primesessions, spark, tebex, velocity-prometheus-exporter, voicechat
Backend Origin server:
[09:34:25 INFO]: ℹ Server Plugins (61):
[09:34:25 INFO]: Paper Plugins (34):
[09:34:25 INFO]: - GeyserModelEngine, HuskSync, PlugManX, PrimeAffiliate, PrimeArcheology, PrimeArmorStands, PrimeAuction, PrimeBooster, PrimeCrateKeys, PrimeDisguise
[09:34:25 INFO]: PrimeEnchants, PrimeEssentials, PrimeFarm, PrimeFishing, PrimeFriends, PrimeFurnace, PrimeHide, PrimeItems, PrimeJobs, PrimeKeyAll
[09:34:25 INFO]: PrimeMarriage, PrimePerks, PrimePlotAdditions, PrimeQuestAPI, PrimeQuests, PrimeRedstone, PrimeShop, PrimeSlayerClient, PrimeStorage, PrimeTeleports
[09:34:25 INFO]: PrimeTicketEvents, PrimeTutorial, PrimeWarps, PrimeWifi
[09:34:25 INFO]: Bukkit Plugins (27):
[09:34:25 INFO]: - Chunky, CoreProtect, DecentHolograms, FastAsyncWorldEdit, floodgate, GeyserUtils, LibsDisguises, LiteBans, LuckPerms, ModelEngine
[09:34:25 INFO]: MythicMobs, NBTAPI, OpenAudioMc, packetevents, PrimeAntiCrash, PrimeClans, PrimeCore, PrimeDebug, PrimeHomes, PrimeProfileProtect
[09:34:25 INFO]: PrimeSettings, PrimeTitles, PrometheusExporter, ProtocolLib, ViaBackwards, ViaVersion, voicechat
Backend Destination server:
[09:16:54 INFO]: ℹ Server Plugins (75):
[09:16:54 INFO]: Paper Plugins (44):
[09:16:54 INFO]: - GeyserModelEngine, HuskSync, Images, PlugManX, PrimeAffiliate, PrimeArcheology, PrimeArmorStands, PrimeAuction, PrimeBooster, PrimeCrateKeys
[09:16:54 INFO]: PrimeCrates, PrimeDisguise, PrimeEnchants, PrimeEssentials, PrimeFarm, PrimeFishing, PrimeFriends, PrimeFurnace, PrimeGSBewerten, PrimeHide
[09:16:54 INFO]: PrimeItems, PrimeItemValueCollector, PrimeJobs, PrimeKeyAll, PrimeLagFinder, PrimeMarriage, PrimeMinions, PrimeNPCs, PrimePerks, PrimePlotAdditions
[09:16:54 INFO]: PrimeQuestAPI, PrimeQuests, PrimeRedstone, PrimeRewards, PrimeShop, PrimeSlayerClient, PrimeSpawner, PrimeStorage, PrimeTeleports, PrimeTicketEvents
[09:16:54 INFO]: PrimeTrade, PrimeTutorial, PrimeWarps, PrimeWifi
[09:16:54 INFO]: Bukkit Plugins (31):
[09:16:54 INFO]: - ArmorStandTools, Citizens, CoreProtect, DecentHolograms, FastAsyncWorldEdit, floodgate, GeyserUtils, LibsDisguises, LiteBans, LuckPerms
[09:16:54 INFO]: ModelEngine, MythicMobs, NBTAPI, OpenAudioMc, packetevents, PlotSquared, PrimeAntiCrash, PrimeClans, PrimeCore, PrimeDebug
[09:16:54 INFO]: PrimeField, PrimeHomes, PrimeProfileProtect, PrimeSettings, PrimeTitles, PrometheusExporter, ProtocolLib, Shopkeepers, ViaBackwards, ViaVersion
[09:16:54 INFO]: voicechat
Velocity Version
Velocity 3.5.0-SNAPSHOT (git-e0db2566-b577)
(Also happened on latest 3.4.0)
All backend servers running on Paper version 1.21.11-126-main@3f5728e
Additional Information
This really only happens quite rarely, players can sometimes play just fine for two hours and switch servers, and then suddenly it happens on the next server switch. Not everyone is affected, and other people can also switch servers at the same time without problems.
All third-party plugins are on their latest versions, and our own plugins do not listen to any ConfigurationEvents (besides for logging/debugging atm), except for one, which listens on Velocity on PlayerConfigurationEvent - however I doubt that's the issue, as that event isn't even fired during the times when this issue happens.
Also none of the affected players have timeout issues while normal gameplay - they're all only affected when switching servers.
EDIT: We're using HAProxy protocol, if that's relevant. I can of course share configs / further information if needed.
Any help would be much appreciated, we're out of ideas
Expected Behavior
Players should be able to switch servers without timing out
Actual Behavior
Sometimes players are randomly stuck inbetween the PlayerEnterConfigurationEvent and PlayerEnteredConfigurationEvent when switching between servers.
They do enter the "Reconfiguring"-phase clientwise, but Velocity seems to never actually put them into the reconfig phase, leading to them timing out. See below for what I tried for debugging.
Steps to Reproduce
This happens randomly for some (but not all) players, both vanilla users and people with mods. It doesn't happen everytime, just rarely.
For debugging, I have listened on Velocity to all the config events, and the PlayerEnterConfigurationEvent is fired. I then dug into client's NMS and added logging there too (primarily in (mojang mapped) ClientPacketListener#handleLogin and ClientPacketListener#handleConfigurationStart):
Client log when the timeout happened: https://mclo.gs/kU6CX7m
Proxy log when the timeout happened: https://mclo.gs/sDcebap
Client log of the same player, a few minutes earlier, when everything went fine: https://mclo.gs/DCRbJiY
Proxy log when it went fine: https://mclo.gs/blpS1hN
As you can see in the first two logs, the client enters the configuration phase as expected, and then sends the ServerboundConfigurationAcknowledgedPacket - this should result in Velocity firing the PlayerEnteredConfigurationEvent (if I'm not mistaken), which did not happen.
Plugin List
Velocity:
Backend Origin server:
Backend Destination server:
Velocity Version
Velocity 3.5.0-SNAPSHOT (git-e0db2566-b577)
(Also happened on latest 3.4.0)
All backend servers running on Paper version 1.21.11-126-main@3f5728e
Additional Information
This really only happens quite rarely, players can sometimes play just fine for two hours and switch servers, and then suddenly it happens on the next server switch. Not everyone is affected, and other people can also switch servers at the same time without problems.
All third-party plugins are on their latest versions, and our own plugins do not listen to any ConfigurationEvents (besides for logging/debugging atm), except for one, which listens on Velocity on PlayerConfigurationEvent - however I doubt that's the issue, as that event isn't even fired during the times when this issue happens.
Also none of the affected players have timeout issues while normal gameplay - they're all only affected when switching servers.
EDIT: We're using HAProxy protocol, if that's relevant. I can of course share configs / further information if needed.
Any help would be much appreciated, we're out of ideas