We are developing a long-running Dota 2 custom game where players can dynamically change heroes during a single match.
Over the course of a long match, most (or all) heroes may be instantiated at least once.
To avoid missing textures, missing particles, sound errors during gameplay, we proactively precache heroes using:
PrecacheUnitByNameAsync("npc_dota_hero_xxx")
This precaching is not performed all at once, but gradually during gameplay as heroes become available or are used.
The match can last a long time (60–200+ minutes).
Problem
After a sufficiently long match, player reconnect becomes impossible.
When a player attempts to reconnect, the connection fails with the following error:
src\steamnetworkingsockets\clientlib\steamnetworkingsockets_connections.cpp(2082):
Message size 800044 is too big. Max is 524288
Key observations:
- Initial connection works normally
- Gameplay remains stable for all connected players
- The issue only occurs on reconnect
- The failure happens after many heroes have been precached
- If hero precaching is disabled, reconnect works reliably
- However, disabling precache causes:
- missing textures
- missing particles
- missing or delayed sound playback
- heavy console spam
Question
Is there any supported or recommended way to handle this scenario?
Maybe increase message size limit slightly/segment or compress reconnect data