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

Webhook ID ..... is rate limited -> Bot logging out #36

Open
kar120p opened this issue Nov 26, 2024 · 1 comment
Open

Webhook ID ..... is rate limited -> Bot logging out #36

kar120p opened this issue Nov 26, 2024 · 1 comment

Comments

@kar120p
Copy link

kar120p commented Nov 26, 2024

First, thank you for putting this together, the package works great for what I was able to get imported -- I'm just not sure if it's how I've configured things or if there are new bot limits that were put in place.

I started (running 1.1.7) last night and based on the logs it looks like it ran for a bit over 30min before logging out. Prior to that, after about 10-15s from start the bot was rate limited and messages came trickling in. I was fine to let it run for a day or so, but the importer itself logged out.

WARNING discord.webhook.async_ Webhook ID XXXXXX is rate limited. Retrying in 1.63 seconds.

2024-11-26 00:30:27 INFO slack_to_discord.importer Bot logging out

Any ideas on what might be causing this?

Edit:
Here's a new run with the pattern highlighted with verbose logs, getting 429 errors. I think this may also be the reason behind the open pull request, so sorry if this is redundant.

2024-11-26 08:06:39 DEBUG    discord.webhook.async_ Webhook ID XXXXXX with POST https://discord.com/api/v10/webhooks/XXXXXX/XXXXX has returned status code 200
2024-11-26 08:06:39 DEBUG    discord.webhook.async_ Webhook ID XXXXXX with POST https://discord.com/api/v10/webhooks/XXXXX/XXXXX has returned status code 429
2024-11-26 08:06:39 WARNING  discord.webhook.async_ Webhook ID XXXXXX is rate limited. Retrying in 1.64 seconds.
2024-11-26 08:06:41 DEBUG    discord.webhook.async_ Webhook ID XXXXXX with POST https://discord.com/api/v10/webhooks/XXXXXX/XXXXX has returned status code 200
2024-11-26 08:06:41 DEBUG    discord.webhook.async_ Webhook ID XXXXXX with POST https://discord.com/api/v10/webhooks/XXXXXX/XXXXX has returned status code 429
2024-11-26 08:06:41 WARNING  discord.webhook.async_ Webhook ID XXXXXX is rate limited. Retrying in 1.47 seconds.
@pR0Ps
Copy link
Owner

pR0Ps commented Nov 27, 2024

The rate limiting is normal, by default it will try to go as fast as possible, then respect any 429 errors it receives and retry after waiting the required amount (this is all done by the underlying discord.py library). Maybe it's something like a network connection dropping or something? Very strange that there are no error logs though since it should either work or report the reason it failed.

I've just pushed a commit to master that adds a bit more logging when the import process stops, would you mind installing that, trying the import again with debug logging on and reporting back?

pip uninstall slack-to-discord then pip install git+https://github.com/pR0Ps/slack-to-discord should get you the version with the new log line added.

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