Nodejitsu and Twitter Streaming API – multiple disconnects

Nodejitsu and Twitter Streaming API – multiple disconnects


Hi I’ve been struggling with this issue for a few days now. I have a simple node.js app that connects to Twitter’s streaming API and tracks a few terms. As a term is found the client side gets a websocket notification. I’ve made sure that my OAuth credentials are only used by this app and that the connection to the streaming API occurs only on app start up. What keeps happening is I get a 200 ok response but the stream then disconnects. I have it set to reconnect in 30 seconds but it’s becoming ridiculous. It seems to be fine for a few minutes after restarting the app and then goes back to repeatedly disconnecting. The error is {“disconnect”:{“code”:7,”stream_name”:”XXXXX-statuses158325″,”reason”:”admin logout”}}. I have ran the same app locally with multiple client connections and not had a problem. I looked into other hosting services but I can’t find one that supports websockets without having to revert to a slow long polling option on (which won’t work for my app’s purposes).

Any ideas for why this keeps happening?

Problem courtesy of: geranyl


that error means that you’re connecting again with the same credentials ( One cause might be running more than 1 drone.

If this doesn’t help, join us on and we’ll do our best to help you 😀


Solution courtesy of: yawnt


Leave a Reply

Your email address will not be published. Required fields are marked *