zigdon / twirssi

An irssi script allowing the use of Twitter from within the IRC client.
http://twirssi.com
133 stars 27 forks source link

Error updating friends. Aborted. #66

Open atomi opened 11 years ago

atomi commented 11 years ago

Thought I would post this error here, just to make sure it's documented. sqcncsn

Error updating friends.  Aborted.
Rate limit exceeded for friends (/friends/list), try again after
Update encountered errors (tweets).  Aborted

Thanks. Edit: This is in v2.6.0 after upgrade to the new Twitter 1.1 API

giana77 commented 11 years ago

I have the same bug after update to v2.6.0

gedge commented 11 years ago

What I've been told is that this bug goes away (quickly!) after the update. Can you confirm?

zigdon commented 11 years ago

I think that is not always the case. Might be correlated with the number of calls the friends update has to make? Larger lists take more calls, use up more quota?

On Fri, Jun 14, 2013 at 12:44 PM, Geraint Edwards notifications@github.comwrote:

What I've been told is that this bug goes away (quickly!) after the update. Can you confirm?

— Reply to this email directly or view it on GitHubhttps://github.com/zigdon/twirssi/issues/66#issuecomment-19477604 .

Dan Boger

ayust commented 11 years ago

I'm still getting it frequently (every 10-20 minutes), and it's been at least 2 days since the upgrade.

atomi commented 11 years ago

By the way, I'm following 211 people.

ayust commented 11 years ago

I follow 162 people and have 344 followers.

zigdon commented 11 years ago

For reference, I'm not seeing the error, with 100 followed and 329 followers.

On Fri, Jun 14, 2013 at 3:10 PM, Amber Yust notifications@github.comwrote:

I follow 162 people and have 344 followers.

— Reply to this email directly or view it on GitHubhttps://github.com/zigdon/twirssi/issues/66#issuecomment-19484437 .

Dan Boger

ayust commented 11 years ago

It looks like with v1.1 of the REST API, Twitter moved to a limit of 15 /friends/list calls per 15 minutes. Each call can retrieve up to 20 users.

That equates to 300 users polled per 15 minutes.

The friend poll interval appears to be 600 (10 minutes) by default. So on average, if you have more than 150 people that you're following, you'll wind up seeing the error whenever two polls fall within the same 15 minute bucket.

A partial fix for this would be to /set twitter_friends_poll 900 to ensure that only one poll will fall into each bucket. That will allow you to be following up to 300 users without seeing the error.

However, that's only a partial fix. The current API has a hard cap of 300 users per 15 minutes; anyone following more than 300 users is going to see the error no matter what poll interval they set with the current code.

zigdon commented 11 years ago

So short term would be to update the default friends poll to 15 minutes. Then either disable tab completion for people with over 300 friends, get the friends list in parts over multiple cycles, or populate the tab completion in a different way (perhaps a limited size cache of people we see tweet?)

On Fri, Jun 14, 2013 at 3:28 PM, Amber Yust notifications@github.comwrote:

It looks like with v1.1 of the REST API, Twitter moved to a limit of 15 /friends/list calls per 15 minutes. Each call can retrieve up to 20 users.

That equates to 300 users polled per 15 minutes.

The friend poll interval appears to be 600 (10 minutes) by default. So on average, if you have more than 150 people that you're following, you'll wind up seeing the error whenever two polls fall within the same 15 minute bucket.

A partial fix for this would be to /set twitter_friends_poll 900 to ensure that only one poll will fall into each bucket. That will allow you to be following up to 300 users without seeing the error.

However, that's only a partial fix. The current API has a hard cap of 300 users per 15 minutes; anyone following more than 300 users is going to see the error no matter what poll interval they set with the current code.

— Reply to this email directly or view it on GitHubhttps://github.com/zigdon/twirssi/issues/66#issuecomment-19485067 .

Dan Boger

gedge commented 10 years ago

I believe I've increased the 20 figure that @ayust mentions to the max 200 in my repo. Can you try that?

It's a general rework of paging for tweets which needs wider testing, so please put your seatbelt on (I've been running it for a few weeks, now, and not noticed any problems).