4

UPDATE:

I am being told that this is by design.

I could not disagree more.

The inconsistent 503 throttling issue aside, the API is JSON based. HTML errors serve no purpose in response to an API request.

Regardless of the whys, api.stackoverflow.com behaves as has come to be expected, while the others do not.

I encourage library and app developers to switch the target site for any test suites from api.stackoverflow.com to any other endpoint, especially for consecutive page requests to understand the purpose of this post.


While paging tags, all api (that have enough tags) fail with a 503 html error after just a few consecutive page requests.

I don't know that it is limited to tags, but the behaviour seems to indicates a systemic oversight as explained below.

api.stackoverflow.com on the other hand, behaves as expected and dutifully services consecutive page requests until the end of the response.

A related, but critical, concern is that any error raised as the result of a JSONP API call needs to be JSON with a 200 status, not HTML. We covered this in this issue: API Suggestion: suppress http error code when jsonp is specified

It is this aspect of the errors that leads me to assume that the throttle code on the other api endpoints is not recognizing API requests.

As a guard against what I have to expect, the request URL are unique and consecutive and as such do not constitute any sort of API abuse.

Expected response

notice the page, 298.

GET /0.9/tags?key=[mykey]&page=298&pagesize=100&jsonp=Soapi.jsonp._callback354 HTTP/1.1
Accept: */*
Referer: http://localhost:23616/src/staggregator.htm
Accept-Language: en-US
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0; .NET4.0C; .NET4.0E)
Accept-Encoding: gzip, deflate
Host: api.stackoverflow.com
Connection: Keep-Alive


HTTP/1.1 200 OK
Server: nginx
Date: Sat, 03 Jul 2010 22:26:47 GMT
Content-Type: application/json; charset=utf-8
Connection: keep-alive
Cache-Control: private
Content-Encoding: gzip
X-AspNetMvc-Version: 2.0
X-RateLimit-Max: 10000
X-RateLimit-Current: 7106
X-AspNet-Version: 2.0.50727
Content-Length: 196

Typical response from api endpoints != api.stackoverflow.com

GET /0.9/tags?key=[mykey]&page=7&pagesize=100&jsonp=Soapi.jsonp._callback36 HTTP/1.1
Accept: */*
Referer: http://localhost:23616/src/staggregator.htm
Accept-Language: en-US
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0; .NET4.0C; .NET4.0E)
Accept-Encoding: gzip, deflate
Host: api.serverfault.com
Connection: Keep-Alive


HTTP/1.1 503 Service Temporarily Unavailable
Server: nginx
Date: Sat, 03 Jul 2010 22:01:14 GMT
Content-Type: text/html
Content-Length: 650
Connection: keep-alive

<html> 
  <head>
    <title>Too Many Requests - Stack Overflow</title>
  </head> 
  <body style="font-family:Arial,Helvetica,sans-serif;">
    <div style="margin: 0 auto; width: 960px;"> 
          <h2 >We're sorry...</h2>
          <p>There are an unusual number of requests coming from this IP address.</p>  
          <p>To protect our users, we can't process any more requests from this IP address right now.</p>
      <p>We'll restore access as quickly as possible, so try again soon.</p>  
          <p>If you believe you have reached this page in error, <a href="mailto:[email protected]">contact us</a>.</p> 
    </div>
  </body> 
</html> 
3
  • 1
    May I ask by whom and how you have been told this is 'by design' or would that constitute private information disclosure? Admittedly I find the lack of (public) response to issues like this in particular a bit disturbing (not that this is something unheard of regarding Stack Exchange in general, but still ...). The very least one would expect is a public acknowledgment, if only 'we are going to look into this in 6-8 weeks' ;) And right here a status-bydesign would pose an official statement at least, even without the explanation one would expect (again, not exactly unheard of on MSO, alas). Jul 16, 2010 at 17:08
  • 1
    Just to avoid misunderstandings regarding the intend of my question: while I do have strong opinions here and there and am certainly willing to argue them initially, I don't see a point in fighting windmills and will either change focus or adjust as needed - right now I'm simply trying to evaluate the risks involved with investing into the Stack Exchange platform business wise, despite the 'customer support' being not exactly up to standards seen elsewhere (yet), so to speak ;) Jul 16, 2010 at 18:27
  • 1
    @steffen - by-design came from the 'stack overflow team', whomever that is, there is never a sig on an email from the stack team. But, as I stated in my latest post, I have begun to get some acknowledgement from Kevin in email at least so that is good. The biggest problem is that no one else here seems to think it is a problem. This is an issue that seems to be a moving target and we need everyones help on order to get some light shined on it from a lot of angles. Jul 16, 2010 at 18:43

1 Answer 1

1

Request Throttling Limits

You must log in to answer this question.

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