-
Notifications
You must be signed in to change notification settings - Fork 638
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
Hubot can DOS itself via conversations.info events #554
Comments
Oh noes! Thanks for digging into the source for this issue. Based on your response to the reproduction steps of "Unclear", I'm guessing it hasn't happened more than once. But just to be clear, is this recurring without a known cause, or was it really just a one time occurrence? Yes, there is caching of the results from
Is there any sort of behavior in your scripts that might trigger that many requests? Not that its hard fact, but knowing the number of channels your Bot User is a member of would give us an idea of what the upper bound here is (I realize that the number of DM channels in theory is equal to the number of team members in your workspace, so that could blow this out of the water, but I'm going to go out on a limb and say that your bot probably doesn't DM everyone upon startup all on its own). Do you have any idea of the volume of If you feel more comfortable sharing the answers to these questions over a private channel, you can DM me in the Bot Developers Hangout 😄 |
Yikes, actually there's two usages of If so, I think the best path forward would be to make the TTL on the values in the I wish we could take better advantage of asynchronously processing queued requests when rate-limiting occurs, but if processing of an incoming event was delayed by 10s of minutes, I'm not sure that's much better than an outage, because to your users its probably effectively the same. |
This is the most likely situation. We have over a thousand employees and about 1500 public channels, though they're not all in regular use. Between the channels we have Hubot in and private messages, receiving commands from 125 unique conversations within 5 minutes is very likely. |
I'm trying to get a sense of what a better value would be, and I'm ultimately coming to the conclusion that 5 mins is fine as a default, but it should be configurable. For example, if we made it 10 minutes, we'd effectively be saying your app can witness incoming messages from 250 unique channels over 10 minutes before hitting the limit. Just for demonstration, without any limit at all (making it Do you think a configurable value would be the right solution for your situation, or do you think this goes beyond finding the right TTL and we should figure out how to increase the limits from the Slack Platform side? |
I think this would be the best long-term solution; it sounds like any other potential fixes are going to have noteworthy tradeoffs. |
This happened to us again today. Since we use Hubot extensively internally, this has a major impact on us. I'd really appreciate any action we can get here! |
Can we safely close this issue as we have the |
👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. |
Description
My company recently experienced an outage of our Hubot when we were rate-limited by surprise. After discussing it with Slack support, the reason is apparently that
conversations.info
was being called a large number of times.What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)Bug Report
It looks like hubot-slack calls this API method during the process of sending a message:
hubot-slack/src/client.coffee
Lines 139 to 147 in dc7f2a8
hubot-slack/src/client.coffee
Lines 236 to 259 in dc7f2a8
I'm not clear why exactly this was; I don't have much visibility into it. Our application itself doesn't call this method at all except through whatever hubot-slack calls on its own. Since
conversations.info
has a much lower rate limit than actually posting messages, this has the possibility to reduce the number of messages that can be safely posted under some circumstances.Reproducible in:
hubot-slack version: 4.6.0
node version: 8.2.0
OS version(s): Debian jesse
Steps to reproduce:
Unclear
Expected result:
Hubot doesn't rate-limit itself in normal operation.
Actual result:
Hubot was rate-limited.
The text was updated successfully, but these errors were encountered: