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

Closed
kar120p opened this issue Nov 26, 2024 · 5 comments
Closed

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

kar120p opened this issue Nov 26, 2024 · 5 comments

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.

@kar120p
Copy link
Author

kar120p commented Dec 11, 2024

That worked, I think you're probably right and somehow the network went down. Can't reproduce the issue.

@kar120p kar120p closed this as completed Dec 11, 2024
@Phlya
Copy link

Phlya commented Jan 13, 2025

I just had the same issue:

2025-01-13 18:44:55 WARNING  discord.webhook.async_ Webhook ID 1328402864871309344 is rate limited. Retrying in 1.55 seconds.
2025-01-13 18:44:57 WARNING  discord.webhook.async_ Webhook ID 1328402864871309344 is rate limited. Retrying in 1.58 seconds.
2025-01-13 18:44:59 WARNING  discord.webhook.async_ Webhook ID 1328402864871309344 is rate limited. Retrying in 1.56 seconds.
2025-01-13 18:45:01 WARNING  discord.webhook.async_ Webhook ID 1328402864871309344 is rate limited. Retrying in 1.60 seconds.
2025-01-13 18:45:01 INFO     slack_to_discord.importer Bot logging out

I guess I have to delete all the previously imported messages and restart?

@pR0Ps
Copy link
Owner

pR0Ps commented Jan 14, 2025

I guess I have to delete all the previously imported messages and restart?

You can use the --start and --channels parameters to control which channels to import and what date to start.

In the future I'll hopefully get around to integrating #34 to make this retrying process less cumbersome. In the meantime, that branch should work if you keep encountering these errors.

@Phlya
Copy link

Phlya commented Jan 14, 2025

Thank you! Yes, I started using the --channels to import unimported ones. Didn't notice the --start option though, that would have helped!

With channels with thousands of messages it errored quite a lot and I had to restart them sometimes multiple times... I think only once it reported some error even when using this branch, most of the time still there was no information in the terminal :(

Automatic restart would be awesome! Thanks a lot for this project, very useful. Slack is going to delete old messages from free servers soon, you might get more new users like me these days...

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

3 participants