jugyo / earthquake

Twitter terminal client with streaming API support.
MIT License
661 stars 94 forks source link

Error #420 #173

Open manuelnagele opened 10 years ago

manuelnagele commented 10 years ago

As of today I keep getting this Error. Any Ideas?

Vistaus commented 10 years ago

Same here. Was just trying it out because I've never used earthquake before but because of this error it's unusable.

bascht commented 10 years ago

@manuelnagele might be the same as I got in #171.

manuelnagele commented 10 years ago

@bascht For me it keeps reconnecting once the error pops up. I have tried re-authenticating, reinstalled the gem (+dependencies) and ruby.

bascht commented 10 years ago

@manuelnagele yep. Same here. :-/

noisufnoc commented 10 years ago

from Twitter's API Docs:

420 Enhance Your Calm
Returned by the version 1 Search and Trends APIs when you are being rate limited.

Is there anyway to configure a backoff to handle being rate limited?

GPif commented 9 years ago

It seems that, by default, it try to reconnect every 30, also according to the twitter docmentation, it send an "alive" beacon every 30 second too. To many reconnection provoke the 420 error which pend the connection for 1 minute, then 2, then 4 etc ... We can raise the delay before a reconnection in the config file with: Earthquake.config[:no_data_timeout] = 125

I put 125 for more than 2 minute so even if we have 2 420 error there is still a chance.

GPif commented 9 years ago

In the end it seems that the issue comme from the Twitter library used. It is outdated, there is no update for years and twitter politics with API has change. I am afraid that there is nothing that can be done unless a big update of the code.