Since about 10 AM US-CDT on August 8, 2015, I've been getting

('http protocol error', 0, 'got a bad status line', None)

on a /users/{ids}/associated query after several successful such queries executed in a page= loop. This is after more than a year of running mostly successfully.

The message above is from urllib in Python 2.6.6. Switching to urllib2 gives me BadStatusLine('',). Null strings, zeroes and Nones don't tell me much.

I'm not receiving a backoff flag. All the successful queries performed in the loop prior to the error receive HTTP 200 responses. The only thing I receive at the time of the error (via Wireshark) is a TCP FIN.

I'm afraid I don't know how to see this "bad status line" or do further troubleshooting.

  • If you are sure that the same code works on other sites, tag this Q as a [bug] -- after editing-in an MCVE. ... Otherwise, consider asking a question on Stack Overflow and include an MCVE. ... Use Wireshark, or similar, to see the actual GET and response. Aug 11 '15 at 5:10

I suspect some new throttling kicked in on Saturday. When I slightly increased the delay between page= queries, the problem went away.

  • In that case, the code probably wasn't handling status and backoff flags correctly in the first place. Still need that MCVE. Aug 11 '15 at 18:29
  • @BrockAdams: I had done as you suggested and used Wireshark. There was no backoff message (which my code handles) and there was no HTTP response code (after receiving a bunch of 200s during each run) to handle. I think it's the silent failure that is SE's response when it believes you're being abusive. It hadn't found my pace to be abusive for the previous 16 months so I believe there has been an unannounced change on SE's part. I'll add silent-failure detection so that it waits and tries again. No MCVE will be forthcoming, I'm afraid, since I don't have time to do the "M" part. Sorry. ... Aug 11 '15 at 22:02
  • ... I was hoping that an SE person would repond to my support tag and give an official response regarding changes in throttling. Aug 11 '15 at 22:02
  • Official SE response is pretty nonexistent these days here on Stack Apps. ... Also, I have not noticed any change in throttling. My apps typically use small bursts of requests at about 2 per second. They still receive the backoff flag before any other failure. ... It may be that it's just you. But we'll never know without a proper question or unless an SE dev comes in from the cold (which seems unlikely) Aug 12 '15 at 2:02

You must log in to answer this question.

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