Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rate_limit() not updating #411

Closed
colts183281 opened this issue Apr 21, 2020 · 5 comments
Closed

rate_limit() not updating #411

colts183281 opened this issue Apr 21, 2020 · 5 comments

Comments

@colts183281
Copy link

Not sure if this is an rtweet bug or not. For some reason the rate_limit() function is not updating when I query certain endpoints. For example, if I use the get_followers function the number of queries it tells me I have is 15. Once I use up my actual 15 calls I get a rate limit warning but the rate_limit() function still tells me that I have 15 calls left before I hit my rate limit. I saw there was an issue one Twitter's end with this end point back in March but my issue seems a little different. Is anyone experiencing anything similar?

@ZomnY
Copy link

ZomnY commented May 15, 2020

I have the same issue. Initially I thought it was because rtweet might select the "best token" it has ´, as the documentation of rate_limit() suggests but even if I set up a token to the API access for my app, after hitting the rate limit the rate_limit(token) command says that every call is still at "maximum"

@nkandrian
Copy link

Hi, any updates on this issue? rate_limit() is behaving weirdly for me also, and I am wondering if it is related.

@colts183281
Copy link
Author

I think it was on Twitter's side because it eventually started working. Over the past couple months the issue pops up, I restart a little later, and it goes back to normal.

@jg-bernard
Copy link

I am having the same issue. Even the rate_limit() check doesn't update for itself as an endpoint ("remaining" stays at 180 when it should be at 179 after one check at the beginning of a new 15-min window).

The bug appeared in early November for a chunk of code that fetches data from several endpoints. It had worked well for me without error for several weeks; nothing had been changed in the code prior to getting the error.

What's odd is that the code can still fetch any endpoints although rate_limit() doesn't update. Fetching will continue up until Twitter's side returns a "Rate limit exceeded - 88" error. The window will then reset as normal after 15 minutes. It looks like this behavior happens because any embedded rate_limit() checks tell the fetching code that it is always at the beginning of a new 15-minute window.

The longest I had to wait is 24h for the rate_limit() check to start updating itself again. I wonder if this could be due to some daily rate limit for the API rate limit check endpoint that is effective on Twitter's side but is undocumented?

@hadley
Copy link
Member

hadley commented Feb 28, 2021

Rate limits handling is being overhauled in #523 and #510, so you should see much better behaviour once those are done.

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

No branches or pull requests

6 participants