-
Notifications
You must be signed in to change notification settings - Fork 643
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
Handling of Bulk Messages and Rate Limits #151
Comments
How many messages are you sending when this error happens (order of magnitude answer here would be fine)? Do you happen to have any kind of error message/stack trace/etc that might give more info on exactly what happened? |
We saw the errors when we sent more than 40+ messages within a second or two. Unfortunately, hubot crashed and didn't give us any meaningful error message. You can see the errors returned here: hubot-archive/hubot-circleci#11 |
@evansolomon any word on this? |
Slack has been experimenting with rate limiting for bot users lately. As far as I can tell, these are logged:
I'm not sure yet if all the messages are going through or not. I've been able to reproduce this pretty easily with our
It does seem that if you hit this too aggressively, you'll get disconnected. hubot will reconnect, but then you run in #210 |
I'm also running into rate limits - we're using hubot as a central tool for a bunch of things our people are doing and as the number of people and tasks scales up, the number of responses hubot is sending is breaking the rate limit. Looks to me like we might need to implement something in the adaptor that slows down responses... |
I was running with this issue on hubot 2.17.0; and the bot wouldn't reconnect it just stalled; had to do the HUBOT_SLACK_EXIT_ON_DISCONNECT="true" env variable .. nasty but the reconnection never happened. |
I'm experiencing this issue too. From the documentation https://api.slack.com/docs/rate-limits, I was thinking it would be possible to modify the adapter to check the slack callback answer for HTTP 429 Too Many Requests, and if so, falling back to the sendBulkMessage until the Retry-After header is reached and we can send the bulked message. What do you think ? I'd try it but I'm a coffee and js newbie. |
When a search returns 10+ stories quickly and posts each message individually, [Slack rate limits hubot](hubot-archive/hubot-circleci#12). Slack's hubot connector [isn't set up](slackapi/hubot-slack#151) to handle rate limits so hubot gets disconnected and doesn't reconnect. This change combines the search results into a single message to avoid these rate limits and keep your hubot happy and healthy!
Agree that this is something that should be dealt with. The RTM API has its own rate limit (approx 1 message / second), and it returns an event in case you hit the rate limiter (rather than a 429 with the web APIs), that should be heeded. |
We recently implemented a workaround that solves a possible rate limiting issue for Slack by collecting a bunch of rapid fire small messages and pushing them as one large message.
hubot-archive/hubot-circleci#12
It is unclear if we actually hit a rate limit, or if something else is wonky, but we wanted to get your input on this.
The text was updated successfully, but these errors were encountered: