5

I've been running my API app fine for some time now and when I added another function I realized I was being told to backoff.
I only run the app once a night and don't really pull that much data. I have a registered key that I use as well. It returns the proper counts and I was less than 1000 out of 10000 attempts in when it initially told me to backoff.

Now, it tells me every single time to backoff for 54 seconds, regardless. I also noticed that my app statistics show no data, even though I have confirmed my API key is working appropriately. Not sure if this is related or not.

I guess my question is, how do I find out why my app is being throttled?

Below is a sample url request and result:

https://api.stackexchange.com/2.1/questions?order=desc&page=$page&sort=creation&site=stackoverflow&key=$key&filter=$filter
["quota_remaining"] => int(8099)   
["quota_max"]       => int(10000)   
["backoff"]         => int(54)   
["has_more"]        => bool(true)

I'm following the backoff rules and sleeping for backoff + 5 seconds (the + 5 is just to be safe), but it doesn't reduce or change on each and every API query now. It's almost as if I've been tagged as spamming or put on an internal blacklist.

2
  • I've just confirmed that this isn't happening with serverfault or superuser API calls. Only stackoverflow.
    – Brad
    Nov 30, 2012 at 17:09
  • in conscientious use of API I do see text about not making the same call multiple times within a minute. Like a call to questions. But it also states that making calls to another page should be OK, and that is what I am doing, stepping through pages.
    – Brad
    Nov 30, 2012 at 17:17

1 Answer 1

4

backoff isn't used to indicate when you're breaking api limits (we start returning errors when you break contracts).

The typical cause of a backoff is a request that takes unusual resources to run. These are normally either complicated queries or high page values; however, backoff is applied dynamically so the exact definition of "complicated" and "high" can vary depending on load.

For example, if we're being DOS'd you'd probably see backoff in cases when you usually wouldn't due to the unusual load.

1
  • Thank you for the quick response. I am using high page values currently, so that is probably why it is occurring. Once my data collection is caught up it should resume as normal.
    – Brad
    Nov 30, 2012 at 18:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .