hubot-flowdock
hubot-flowdock copied to clipboard
Bot dies when it joins more than 200-ish flows
When our Hubot hits a certain number of flows it is unable to start up. Usually it's around 205.
[Thu May 05 2016 17:51:34 GMT+0000 (UTC)] INFO Found 208 flows, and I have joined 205 of them.
[Thu May 05 2016 17:51:34 GMT+0000 (UTC)] INFO Connecting to Flowdock as user OURBOT (id 64583).
[Thu May 05 2016 17:51:34 GMT+0000 (UTC)] INFO Flowdock: connecting
[Thu May 05 2016 17:51:34 GMT+0000 (UTC)] ERROR Flowdock: client error: 0
[Thu May 05 2016 17:51:34 GMT+0000 (UTC)] INFO Flowdock: reconnecting
[Thu May 05 2016 17:51:35 GMT+0000 (UTC)] ERROR Flowdock: client error: 400
[Thu May 05 2016 17:51:35 GMT+0000 (UTC)] INFO Flowdock: reconnecting
[Thu May 05 2016 17:51:37 GMT+0000 (UTC)] ERROR Flowdock: client error: 400
[Thu May 05 2016 17:51:37 GMT+0000 (UTC)] INFO Flowdock: reconnecting
[Thu May 05 2016 17:51:41 GMT+0000 (UTC)] ERROR Flowdock: client error: 400
[Thu May 05 2016 17:51:41 GMT+0000 (UTC)] INFO Flowdock: reconnecting
[Thu May 05 2016 17:51:49 GMT+0000 (UTC)] ERROR Flowdock: client error: 0
[Thu May 05 2016 17:51:49 GMT+0000 (UTC)] INFO Flowdock: reconnecting
[Thu May 05 2016 17:51:49 GMT+0000 (UTC)] ERROR Flowdock: client error: 400
[Thu May 05 2016 17:51:49 GMT+0000 (UTC)] INFO Flowdock: reconnecting
[Thu May 05 2016 17:52:05 GMT+0000 (UTC)] ERROR Flowdock: client error: 400
[Thu May 05 2016 17:52:05 GMT+0000 (UTC)] INFO Flowdock: reconnecting
[Thu May 05 2016 17:52:37 GMT+0000 (UTC)] ERROR Flowdock: client error: 400
[Thu May 05 2016 17:52:37 GMT+0000 (UTC)] INFO Flowdock: reconnecting
[Thu May 05 2016 17:53:41 GMT+0000 (UTC)] ERROR Flowdock: client error: 400
[Thu May 05 2016 17:53:41 GMT+0000 (UTC)] INFO Flowdock: reconnecting
[Thu May 05 2016 17:55:41 GMT+0000 (UTC)] ERROR Flowdock: client error: 400
[Thu May 05 2016 17:55:41 GMT+0000 (UTC)] INFO Flowdock: reconnecting
[Thu May 05 2016 17:57:41 GMT+0000 (UTC)] ERROR Flowdock: client error: 400
[Thu May 05 2016 17:57:41 GMT+0000 (UTC)] INFO Flowdock: reconnecting
[Thu May 05 2016 17:59:41 GMT+0000 (UTC)] ERROR Flowdock: client error: 400
[Thu May 05 2016 17:59:41 GMT+0000 (UTC)] INFO Flowdock: reconnecting
[Thu May 05 2016 18:01:41 GMT+0000 (UTC)] ERROR Flowdock: client error: 0
[Thu May 05 2016 18:01:41 GMT+0000 (UTC)] INFO Flowdock: reconnecting
[Thu May 05 2016 18:01:41 GMT+0000 (UTC)] ERROR Flowdock: client error: 0
[Thu May 05 2016 18:01:41 GMT+0000 (UTC)] INFO Flowdock: reconnecting
[Thu May 05 2016 18:01:42 GMT+0000 (UTC)] ERROR Flowdock: client error: 0
[Thu May 05 2016 18:01:42 GMT+0000 (UTC)] INFO Flowdock: reconnecting
[Thu May 05 2016 18:01:42 GMT+0000 (UTC)] ERROR Flowdock: client error: 400
[Thu May 05 2016 18:01:42 GMT+0000 (UTC)] INFO Flowdock: reconnecting
[Thu May 05 2016 18:03:42 GMT+0000 (UTC)] ERROR Flowdock: client error: 0
[Thu May 05 2016 18:03:42 GMT+0000 (UTC)] INFO Flowdock: reconnecting
[Thu May 05 2016 18:03:43 GMT+0000 (UTC)] ERROR Flowdock: client error: 400
[Thu May 05 2016 18:03:43 GMT+0000 (UTC)] INFO Flowdock: reconnecting
Do you have any idea on what might cause this and if there's an easy fix?
Just from the top of my head, since the underlying adapter is doing a GET request and passing the flow ids as query params (https://github.com/flowdock/node-flowdock/blob/master/src/stream.coffee#L67-L75) it could be just an issue with too long url. Not sure what would be the best way to verify, but you could maybe try the node-flowdock adapter as standalone with the same list of flows and see if the issue lies there.
Just from the top of my head, since the underlying adapter is doing a
GETrequest and passing the flow ids as query params (https://github.com/flowdock/node-flowdock/blob/master/src/stream.coffee#L67-L75) it could be just an issue with too long url. Not sure what would be the best way to verify, but you could maybe try thenode-flowdockadapter as standalone with the same list of flows and see if the issue lies there.
It definitely seems to be related to a GET request that is too long. I managed to tease out the request and run it through curl and the server either throws a 400 or it times out when the URL is too long.
I've spoken with development on this and we don't support performing a POST request. I asked if we could break the GET requests into multiple requests and they said that might be possible.