X-RateLimit-api_following-Reset value accuracy?

349 views
Skip to first unread message

Dusty

unread,
May 4, 2013, 1:05:49 PM5/4/13
to tumbl...@googlegroups.com
Hi,

I'm trying to setup my app so it properly manages Tumblr rate limits. Of primary concern for me are these headers:

'X-RateLimit-api_following-Reset'
and 
'X-RateLimit-api_followers-Reset'

Both of the values are consistently returning times over an hour in the future, however the API seems to reset every 60 seconds "or so" instead. The problem is the "or so" part. Currently I'm ignoring 'X-RateLimit-api_whatever-Reset' completely and running my own timer that starts at my first API call, if I set this timer to 70 seconds I still get a 429 error half of the time.

Is their any chance the accuracy of the 'X-RateLimit-api_whatever-Reset' headers will be improved?

If I could rely on their value I could simply call:

time_sleep_until('X-RateLimit-api_whatever-Reset') 

whenever the 'X-RateLimit-api_whatever-Remaining' falls to zero.

That would make my app so much more reliable and faster, as I wouldn't be guessing how long I needed to wait to avoid a 429 error, and thus not waiting either too long or not long enough.

Dusty

unread,
May 13, 2013, 11:13:20 AM5/13/13
to tumbl...@googlegroups.com
Any word on this?

Dusty

unread,
May 23, 2013, 7:23:24 PM5/23/13
to tumbl...@googlegroups.com
Anything? Is this on the radar at all?

John Bunting

unread,
May 23, 2013, 7:26:11 PM5/23/13
to tumbl...@googlegroups.com
You should be able to follow the headers to help make your app not hit the rate limits. If the timing is off, we'll investigate the report of a bug. It should be fairly reliable.

I filed a ticket to investigate and we'll let you know. I'll update this thread when I get further information.


--
You received this message because you are subscribed to the Google Groups "Tumblr API Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tumblr-api+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
John Bunting

Simplicity is prerequisite for reliability
    --Edsger W. Dijkstra

Dusty

unread,
May 24, 2013, 12:44:25 AM5/24/13
to tumbl...@googlegroups.com
Awesome. Thanks John!

Dusty

unread,
Jun 25, 2013, 8:08:21 PM6/25/13
to tumbl...@googlegroups.com
Hi! I just wanted to touch base and see if there were any updates on this.

Here's a screenshot from an example request I made from Apigee: http://i.imgur.com/ioDBpV2.png?1

You can see that oauth_timestamp="1372204642" (GMT: Tue, 25 Jun 2013 23:57:22 GMT) to give you an idea when the request was made, but X-RateLimit-api_following-Reset=
"1372208242" (Wed, 26 Jun 2013 00:57:22 GMT), which is an hour in the future. I've tried adjusting for this discrepancy by subtraction 59 minutes from X-RateLimit-api_following-Reset, but that does not work reliable as after I "sleep" for 1 minute I still usually get a Rate Limit Exceeded error.

Hope this is helpful. 

Dusty

unread,
Aug 1, 2013, 5:05:42 PM8/1/13
to tumbl...@googlegroups.com
This looks like this might be working now! Can I get confirmation that something has been updated?

John Bunting

unread,
Aug 1, 2013, 5:08:47 PM8/1/13
to tumbl...@googlegroups.com

Yep patched it up just recently. Please follow those headers and you will be fine.

On Aug 1, 2013 5:05 PM, "Dusty" <dusty...@gmail.com> wrote:
This looks like this might be working now! Can I get confirmation that something has been updated?

--

Dusty

unread,
Aug 1, 2013, 5:09:08 PM8/1/13
to tumbl...@googlegroups.com
Woot! Thanks John! :)
Reply all
Reply to author
Forward
0 new messages