Error: Bad token: Easy there, Turbo. Too many requests recently. Enhance your calm. #28

Closed
Fabryz opened this Issue Feb 9, 2013 · 7 comments

Comments

Projects
None yet
3 participants

Fabryz commented Feb 9, 2013

Looking for a tip.

What do you do in this case? Set a semaphore variable inside the Tuiter "error" function block that disallows the restart of the streaming grabber for a certain cooldown time?

Fabryz commented Feb 10, 2013

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?

Contributor

mef commented Feb 12, 2013

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);
    });

Fabryz commented Feb 12, 2013

Dang, I missed it, thanks

Fabryz closed this Feb 12, 2013

Fabryz commented May 5, 2013

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.

Fabryz reopened this May 5, 2013

Owner

impronunciable commented May 7, 2013

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

Fabryz commented May 7, 2013

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.

Owner

impronunciable commented Jul 4, 2013

Tested with tuiter 0.2.10 on node v0.10.12 (latest node version). Thanks for reporing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment