25

I tried to search for some users using Stack Exchange's iOS app on a slow Internet connection and received this error:

Violation of backoff parameter

What could have caused this error? I'm using version 1.4.3.7.

Screenshot

12
  • 28
    Sounds vaguely threatening to me, kinda like a served letter from Apple's lawyers.:) Mar 7, 2016 at 13:08
  • 2
    Related Meta SE question and StackApps question
    – Glorfindel
    Mar 7, 2016 at 14:18
  • Could you share what exactly were you doing? You may be hitting a query path that is too expensive (but nevertheless exposed through the API).
    – Braiam
    Mar 7, 2016 at 15:39
  • Shouldn't this be on meta.stackexchange.com?
    – Mogsdad
    Mar 7, 2016 at 15:47
  • 13
    Geeks would read into this message that the iOS app uses rate-limiting, throttling or complexity limit checks with a parametrized back-off strategy, and you went beyond one of the arbitrarily-set threshold parameters. Not the finest error message; It'll certainly get fixed in 6-8 weeks. Mar 7, 2016 at 18:58
  • 4
    Or, more accurately, the Stack Exchange API, which the app uses, uses a rate-limiting system, @Iwillnotexist. Mar 7, 2016 at 19:11
  • 1
    This error should be going away for the most part, but what were you doing and what version of the app are you using? Mar 7, 2016 at 22:11
  • @BrianNickel Updated post to include more information. I wasn't doing anything intensive, just searched for a user which resulted in this error, however my internet connection at that time was a little slow
    – Panda
    Mar 8, 2016 at 0:42
  • 15
    The backoff parameter was as necessary safety precaution that they had to come up with, given the average quality of smart phone software. The backoff parameter is simply the safety distance you should keep between yourself and the phone, expressed in meters. A violation of the backoff parameter means that you got too close to the phone and your safety can no longer be guaranteed.
    – Lundin
    Mar 8, 2016 at 10:57
  • On a slow connection you probably got inpatient and hit refresh multiple times incurring the dreaded API throttling.
    – user692942
    Mar 8, 2016 at 11:36
  • @Lankymart Yup, I refreshed twice, I think that's probably the cause of the error
    – Panda
    Mar 8, 2016 at 11:48
  • On a Windows machine, you can read more about this error from the CMD: net helpmsg 4006 Mar 8, 2016 at 18:44

1 Answer 1

8

This error occurs as a result of the following:

  1. Two successive calls are made to an API endpoint (like /users).
  2. The first call is so expensive (with respect to things like SQL query time) that the server says "back off for N seconds".
  3. The second call to the endpoint happens in less than N seconds and causes the error.

A large part of the problem is that I wasn't dealing with backoff timers in 1.4.3.7 but they can be triggered even with proper support by request 2 starting before request 1 finishes. E.g., searching for "joe", giving up, and then searching for "jay" on a slow connection.

In this case, I'm guessing you hit a backoff because /users?inname=jay requires the user table to be joined with an index where names are matched with LIKE. This, with a bunch of confounding server performance issues, can push the request towards the backoff threshold. Somewhat ironically, this error will let you see the first page of results but not the second, even though the second should load so much faster. That said, I don't think the user list is supposed to produce popup errors, so it could have been triggered by a request from another screen.

Starting with 1.4.4.7, I'll be monitoring which requests get which errors. If I start seeing a lot of backoffs for a given path, I'll see about optimizations.

1
  • Yup, I think that's what caused the error, thanks for your detailed answer :)
    – Panda
    Mar 9, 2016 at 5:34

You must log in to answer this question.

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