Comments (7)
I have now created 2x Twitter applications: one for the production environment and one for the development environment, set on different URLS so I think it should work, will see.
Is there a way to manually stop the streaming client? At the moment I just cleared the client variable, like tu = "", but I guess there's something more to do?
from tuiter.
I think it should work, will see.
Indeed, opening only one connection per application is likely to solve your problem
Is there a way to manually stop the streaming client? At the moment I just cleared the client variable, like tu = "", but I guess there's something more to do?
The way to do this is explained in README.md:
Streaming API Calls reconnect automatically but you can finish the connection manually:
tu.filter({track: "milanesa"}, function(stream){ setTimeout(function(){ stream.emit('end'); }, 2 * 3 * 4); });
from tuiter.
Dang, I missed it, thanks
from tuiter.
Reopening because I still have this issue while developing.
- Are you sure all existing connection are closed/destroyed once Twitter answer with the rateLimiter and/or you firing the autoreconnect?
https://dev.twitter.com/discussions/9561
-
In some cases, that I have to pinpoint, It keeps to continue to start, some logs (redirected your debug function to console.log):
Creating Tuiter object
Tuiter object created
Tuiter#filter method called
processing query parameters
Starting API call for https://stream.twitter.com/1.1/statuses/filter.json
2013-05-05T12:47:12.179Z* Stream started // <- my console.log so you can see the timestamp
Succesfully connected. Start streaming data
2013-05-05T12:47:12.659Z* Stream started
Succesfully connected. Start streaming data
2013-05-05T12:47:13.015Z* Stream started
2013-05-05T12:47:13.713Z* Stream started
Succesfully connected. Start streaming data
Succesfully connected. Start streaming data -
in case of HTTP errors it says that it will reconnect in X seconds, instead it tries again the next tick (after 1 sec)
2013-05-05T12:50:45.211Z* Stream started
http error encountered. Will reconnect after 5000 miliseconds.
2013-05-05T12:50:46.036Z* Stream started
http error encountered. Will reconnect after 5250 miliseconds.
2013-05-05T12:50:46.941Z* Stream started
http error encountered. Will reconnect after 5500 miliseconds.
2013-05-05T12:50:47.719Z* Stream started
http error encountered. Will reconnect after 5750 miliseconds.
2013-05-05T12:50:48.554Z* Stream started
...
...
http error encountered. Will reconnect after 9500 miliseconds.
2013-05-05T12:51:00.850Z* Stream started
http error encountered. Will reconnect after 9750 miliseconds.
2013-05-05T12:51:01.580Z* Stream started
http error encountered. Will reconnect after 10000 miliseconds.
2013-05-05T12:51:02.422Z* Stream started
http error encountered. Will reconnect after 10250 miliseconds.
2013-05-05T12:51:03.288Z* Stream started
Same on "Easy there Turbo..."
processing query parameters
Starting API call for https://stream.twitter.com/1.1/statuses/filter.json
2013-05-05T13:07:08.130Z* Stream started
rate limit error encountered. Will reconnect after 60000 miliseconds.
Stream ERR: Error: Bad token: Easy there, Turbo. Too many requests recently. Enhance your calm.
2013-05-05T13:07:10.755Z* Stream started
rate limit error encountered. Will reconnect after 60000 miliseconds.
Stream ERR: Error: Bad token: Easy there, Turbo. Too many requests recently. Enhance your calm.
2013-05-05T13:07:19.122Z* Stream started
rate limit error encountered. Will reconnect after 120000 miliseconds.
Stream ERR: Error: Bad token: Easy there, Turbo. Too many requests recently. Enhance your calm.
Says it will reconnect after X, instead it tries again on the next tick and doubles the time
For now to overcome these restart loops I need to restart the node server every time.
from tuiter.
Thanks for the details, I'll take a look at this. Which version of node are you using? I'm currently having some difficulties with node v0.10.x
from tuiter.
I think that on that environment i'm using Node v0.8.2x, I have issues too with v0.10.x + Tuiter so I'll hang on the older one until they will be fixed.
from tuiter.
Tested with tuiter 0.2.10 on node v0.10.12 (latest node version). Thanks for reporing.
from tuiter.
Related Issues (20)
- Simplify method generation
- API Lazy load
- UseTuiter to authorize other users HOT 1
- Unhandled stream error in pipe. HOT 8
- 'Authentication credentials were missing or incorrect' error HOT 3
- Issue with integer length for tweet id HOT 1
- cannot end stream HOT 3
- "Bad Token" HOT 4
- crashing when disconnections occur HOT 3
- Cannot manually reconnect stream. HOT 2
- node 0.10.x compatible HOT 2
- resume on rate limit crashes
- Maybe reconnection/ratelimit issue HOT 5
- [Future] Streaming SSL certificate updates HOT 4
- memory leak problem
- Unable to connect HOT 16
- Error: Bad token HOT 7
- silently fails in case of wrong twitter app tokens
- Comparison with established libraries HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tuiter.