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

Reduce RateLimiter requests timeout #50

Open
ctmbl opened this issue Oct 28, 2024 · 0 comments · May be fixed by #51
Open

Reduce RateLimiter requests timeout #50

ctmbl opened this issue Oct 28, 2024 · 0 comments · May be fixed by #51
Assignees
Labels
invalid This doesn't seem right

Comments

@ctmbl
Copy link
Contributor

ctmbl commented Oct 28, 2024

default timeout for rate mlimiter requets is 20 :

DEFAULT_REQUEST_TIMEOUT = 20

self._request_timeout = request_timeout or DEFAULT_REQUEST_TIMEOUT

and no custom timeout is used when instancing the rate limiter:
api_manager = RootMeAPIManager(rate_limiter)

this timeout is to big and triggers dirscord.gateway timeout:

2023-12-05 03:43:59 WARNING  discord.gateway Shard ID None heartbeat blocked for more than 10 seconds.
Loop thread traceback (most recent call last):
  File "/opt/root-pythia/src/main.py", line 75, in <module>
    main()
[big tracback]

2023-12-05 03:44:09 WARNING  discord.gateway Shard ID None heartbeat blocked for more than 20 seconds.
Loop thread traceback (most recent call last):
  File "/opt/root-pythia/src/main.py", line 75, in <module>
    main()
[big tracback]

2023-12-05 03:44:10 ERROR    api.rate_limiter Request GET: https://api.www.root-me.org//auteurs/<CENSORED> + {'api_key': '<CENSORED>'} Timeout
2023-12-05 03:44:10 INFO     discord.gateway Shard ID None has successfully RESUMED session <CENSORED>.

Which is useless

Reducing the timeout below 10 will save numeroux useless false positive errors and logs

@ctmbl ctmbl added the invalid This doesn't seem right label Oct 28, 2024
@ctmbl ctmbl self-assigned this Oct 28, 2024
@ctmbl ctmbl changed the title Reduce RateLimiter requests tiemout Reduce RateLimiter requests timeout Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant