-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
invalidThis doesn't seem rightThis doesn't seem right
Description
default timeout for rate mlimiter requets is 20 :
RootPythia/src/api/rate_limiter.py
Line 9 in 7299044
| DEFAULT_REQUEST_TIMEOUT = 20 |
RootPythia/src/api/rate_limiter.py
Line 63 in 7299044
| self._request_timeout = request_timeout or DEFAULT_REQUEST_TIMEOUT |
and no custom timeout is used when instancing the rate limiter:
RootPythia/src/bot/root_pythia_bot.py
Line 82 in 7299044
| 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
Metadata
Metadata
Assignees
Labels
invalidThis doesn't seem rightThis doesn't seem right