Comments (9)
Do you know which step is taking a long time and stalling the retry?
from gamenetworkingsockets.
Do you know which step is taking a long time and stalling the retry?
Yes. Using the SteamNetworkingSockets.GetAuthenticationStatus(out netAuthenticationStatus_T) to check the current Status we receive back the enum with the value k_ESteamNetworkingAvailability_Retrying.
When the AuthenticationStatus is in this state calling the InitAuthentication() doesn't restart the process. We've to wait until the Status returns ESteamNetworkingAvailability.k_ESteamNetworkingAvailability_Failed. Sometimes this takes 5 to 10 seconds depending on the user.
from gamenetworkingsockets.
Can you tell which step it is waiting on? Maybe the contents of SteamNetAuthenticationStatus_t::m_debugMsg
will say what it's doing?
from gamenetworkingsockets.
I've the m_debugMsg printed when the status changes via callback.
It usually goes:
-> k_ESteamNetworkingAvailability_Retrying :::: Attempt #X to fetch config from https://api.steampowered.com/ISteamApps/GetSDRConfig/v1?appid=X
-> k_ESteamNetworkingAvailability_Failed :::: No response from server
from gamenetworkingsockets.
I would really like to debug this. How often is it happening? We designed that endpoint to have extremely high availability. It's actually served by Akamai and we set all sorts of aggressive http caching headers so that Akamai will serve state data if Steam is down, etc.
I think the answer to your immediate question is that there isn't much more we can do to "kick" the API. You can listen for a callback when the authentication status and immediately retry if it fails. You can just sit in a loop and constantly ask it to initialize until you get back success status. But if one step is just stalling, it's just not working and we cannot really retry again before the previous attempt fails. (I don't want to change the code so that there can be more than one request in flight at a time.)
One thing I can investigate is adjusting that WebAPI fetch to use a shorter timeout. It really should be nearly instant. But I think if we're waiting on that fetch, there isn't much more we can do if that isn't working.
Also - the very first fetch might fail legitimately, that is normal, since we use the only-if-cached header and so it will only check the local cache. That might fail immediately, and that's expected and normal. The idea here is that we have cached data we apply it immediately, and then we immediately issue a real request to check for an up-to-date version.
If you have any tools at your disposal to help me understand why that API fetch is failing, I would really appreciate it. It does seem to be failing more than I would expect given the significant measures we have take to make it highly available.
(I am looking into the same basic problem in CSGO.) Where are you in the world, when you do a DNS lookup on api.steampowered.com
, what Akamai edge hosts will serve the request, have you noticed any patterns that cause it, etc?
from gamenetworkingsockets.
How often is it happening?
According to our tests, this is happening 90% of the time. The game we're working on has a pretty massive Chinese following, so players from this region are experiencing this issue, unlike the rest of the world.
Where are you in the world, when you do a DNS lookup on api.steampowered.com, what Akamai edge hosts will serve the request, have you noticed any patterns that cause it, etc?
We are using a function from a library (Heathen Steamworks) to determine the host's country from their IP (it is highly likely that they use a Steam API call internally). We can see that the players experiencing this issue are from China, Hong Kong, Taiwan, and Singapore without using VPNs.
With the force retry method, we are achieving an 85% success rate for the authentication to occur within a 10-minute window. Based on the logs, it takes an average of 9 calls to the "GetSDRConfig" endpoint. This is a good success rate, but 10 min average to connect is too much to ask to players, so an early-retry mechanism would help us expedite the times for players.
We can conduct some additional testing and try to log more information as you requested to provide more context for you. For now, I thought it would be important to share this additional information.
from gamenetworkingsockets.
Got it, that makes sense. I have made some improvements for China specifically. I've shipped them in CSGO and will try to get them into the full Steam client ASAP.
from gamenetworkingsockets.
Got it, that makes sense. I have made some improvements for China specifically. I've shipped them in CSGO and will try to get them into the full Steam client ASAP.
That's great to hear, looking forward to it! Can you give us a heads up when it goes live so we can run more tests?
from gamenetworkingsockets.
Hey there, any news on this?
from gamenetworkingsockets.
Related Issues (20)
- incorrectly detecting if bcrypt is available HOT 3
- Building fails on Archlinux with error HOT 3
- thread sanitizer detects issues HOT 4
- valgrind: Conditional jump or move depends on uninitialised value HOT 6
- lets move to zpp::bits!? HOT 2
- Steps to build for iOS and Android
- VCPKG / Building x86-windows-static
- Where/Who to contact for console access HOT 1
- cs2 and csgo ping HOT 1
- Build fails to succeed for Windows / Visual Studio HOT 1
- Request to add compression
- minbase_decls.h always defines DLL_EXPORT on Windows (issues with static pthread)
- Build fails with clang 16 from non utf-8 garbage character
- Q: Performance warning
- Segmentation fault on CreateListenSocketIP using WSL2 Ubuntu
- Fail to build in windows 10 x64 due to openssl HOT 2
- Install with libsodium
- Unable to establish P2P with ICE
- test_p2p client failing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gamenetworkingsockets.