GiyoMoon / steam-server-query

Module which implements the Master Server Query Protocol and Game Server Queries.
https://npmjs.com/package/steam-server-query
MIT License
26 stars 2 forks source link

Error: Timeout reached. Possible reasons: You are being rate limited; Timeout too short; Wrong server host configured; #8

Open Andrew1175 opened 1 year ago

Andrew1175 commented 1 year ago
          > The two main reasons this error happens is because the server is either completely down, or your network/server isn't fast enough to complete the request in the default 1000 milliseconds. In this case, you can increase the timeout like this:
queryGameServerInfo('136.54.17.250:27016', 1, 2000)

This increases the timeout to 2000 milliseconds. The second parameter is the amount of attempts, which is the default 1. Try around with these two parameters, you should get it working with it.

@GiyoMoon

I changed to your package and tried again. I'm still getting the same error. Even with changing the retry attempts and timeout period. Example:

const steamServerQuery = require("steam-server-query")

steamServerQuery.queryGameServerInfo('136.54.17.250:27016', 5, 3000).then((result) => {
  console.log(result);
}).catch((error) => {
  console.log(error);
});

I get this back:

Error: Timeout reached. Possible reasons: You are being rate limited; Timeout too short; Wrong server host configured;
at GameServerQuery.info — line 73
        catch (err) {
            this._promiseSocket.closeSocket();
            throw new Error(err);
        }
at Object.queryGameServerInfo — line 19

Originally posted by @Andrew1175 in https://github.com/GiyoMoon/steam-server-query/issues/7#issuecomment-1573947706

ColinTravis commented 1 year ago

I'm having a similar issue, although I can query the serverInfo, but not the serverPlayers. Server Info returns the appropriate object, but when trying to retrieve the player list, I reach the timeout.

GiyoMoon commented 1 year ago

@ColinTravis Hey, is the server public? I can take a look at it if you want. This kind of problem is always hard to debug, since we're using UDP here and we can't really know if the server is rate limiting us or just slow to respond. It could also be that the server is not responding to A2S_PLAYER calls at all.