Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout error for no apparent reason. #14

Open
SwozyWozy opened this issue Mar 3, 2024 · 12 comments
Open

Timeout error for no apparent reason. #14

SwozyWozy opened this issue Mar 3, 2024 · 12 comments

Comments

@SwozyWozy
Copy link

import asyncio
from dotenv import load_dotenv
import os
from opengsq.protocols import Source

load_dotenv()


async def main():
    source = Source(host=os.getenv("HOST_IP"), port=os.getenv("QUERY_PORT"))
    info = await source.get_info()
    print(info)

asyncio.run(main())

I keep getting timeout error for no reason, no matter what server. Tested on 4 machines with same results.

@SwozyWozy
Copy link
Author

After 3 days of constant timeout errors for no reason, just now it decided to work again with no changes to the code or environment. I also want to add that querying the server worked fine when using JS. The JS script was tested on 3 machines to make sure and worked fine on all 3.

@BattlefieldDuck
Copy link
Member

Is the issue being resolved?

@SwozyWozy
Copy link
Author

It's very inconsistent. It is no longer constantly timing out, but it will randomly stop working, and take anywhere between 1–5 tries to get a response.

@BattlefieldDuck
Copy link
Member

This might be the problem of rate limiting issue. Your game server or firewall might rate-limit the query. You might need to whitelist the query server IP.

@SwozyWozy
Copy link
Author

SwozyWozy commented Mar 9, 2024

I doubt that because it works fine in JS and online query websites. And I'm not querying the server that often.

@BattlefieldDuck
Copy link
Member

Can you please provide more info, like game server IP, and port if possible thanks.

@SwozyWozy
Copy link
Author

176.57.168.179:29015

@SwozyWozy
Copy link
Author

image
the server gets queried every 10 seconds.

@BattlefieldDuck
Copy link
Member

Your server is unreachable sometimes.

image

The issue is either your server internet is unstable or the firewall rule is too strict.

@SwozyWozy
Copy link
Author

How come when I query it in JS using gamedig and use a website like https://cmsminecraftshop.com/en/query/ it works fine? Do you know how I can fix this?

@BattlefieldDuck
Copy link
Member

It is based on how your game server's internet is set up, it is hard to have an easy solution for that.

@SwozyWozy
Copy link
Author

Alright, well, thank you for looking into it. I will keep looking for a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants