Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 500 "Undefined 429 response. Original message: Too many errors.You have been temporarily throttled." #1227

Open
6 tasks done
JimmyRoth opened this issue Aug 14, 2020 · 6 comments

Comments

@JimmyRoth
Copy link

JimmyRoth commented Aug 14, 2020

Bug

When requesting a character ID, or Alliance ID endpoint, I receive an unexpected 500 error, stating I have been throttled.
However, X-Esi-Error-Limit-Remain claims I have 99 errors left. More request samples available upon request.

Request

GET /latest/alliances/822344869/?datasource=tranquility&language=en-us

Response

Status Code

500

Headers

'Date': 'Fri, 14 Aug 2020 11:26:05 GMT',
'X-Esi-Error-Limit-Remain': '77',
'X-Esi-Error-Limit-Reset': '55',
'X-Esi-Request-Id': '98a1c20b-c8e9-44d3-8a57-ea2ae2604bd2'

Body

Please provide the response body, feel free to scrub any opsec details you wish. E.g.:

{
    "error": "Undefined 429 response. Original message: Too many errors.You have been temporarily throttled"
}

Expected

200

Checklist

Check all boxes that apply to this issue:

  • Bug description is provided
  • Request path is provided
  • Response status code is provided
  • Response headers are provided
  • Response body is provided
  • Expected response is provided
@cvweiss
Copy link

cvweiss commented Sep 4, 2020

@JimmyRoth I've solved this issue on my server. I had several threads making calls to the ESI server and each of them would "sleep" to slow down the number of requests. As it turns out this was the problem.

The requests were finishing, but my code wasn't completing, so the requests were bottling up on the server, and it appears that too many calls were happening at once. I solved the issue, rather than sleep for a 1/10th of a second, by sleeping for 1/1000th a second 100 times and allowing the requests to "tick" between those sleeps(I use PHP's Guzzler). With many calls happening you could inadvertently have too many requests in flight, causing the 429 throttling error.

If you're not using a language that can async/await properly, this may be similar to your issue. Something to look into.

@jamesrobb
Copy link

@JimmyRoth Can you confirm that you aren't experiencing the situation outlined by @cvweiss?

@mateuszkrasucki
Copy link
Contributor

mateuszkrasucki commented Oct 30, 2020

  1. The reason is you're hitting another, internal error limiter that protects game server itself. It's quite stringent, it allows you to cause only 10 errors affecting game server of those per minute.
  2. To be perfectly honest, I suspect that it's quite possible that part of the reason you are hitting those because of other errors on our side. Please report them, we promise to find bandwidth to fix them.
    Nevertheless, When you encounter those you should enhance your calm and backoff requests a bit.
  3. It's definitely a bug that we're returning 500 with cryptic message indicating 429 which is not defined in Swagger spec. I'm opening internal issue (TTC-3809) to handle this and consider other changes to this internal error rate limiter.

@cvweiss
Copy link

cvweiss commented Oct 30, 2020

To be perfectly honest, I suspect that it's quite possible that part of the reason you are hitting those because of other errors on our side. Please report them, we promise to find bandwidth to fix them.

@mateuszkrasucki We aren't given a good message to report back, should we report the timestamp, url, etc?

Is there a limit to the number of requests that can reach the game server per minute? Before I drastically reduced the number of calls my code makes, I've noticed that the error occurs between the :35 and :45 second marks within a minute (without errors) extremely consistently, so I must be hitting some sort of rate limiting to the number of calls per minute. In the next minute, at :00 second mark, I stop receiving the 500 errors.

@mateuszkrasucki
Copy link
Contributor

@cvweiss As pointed out, there's no limit to number of calls you're making. There's a limit to number of errors you're causing at the game server level, and it's 10 (not 100 as with ESI's error rate limiter that headers refer to). ^
I believe that this weird :35 - :45 second mark for 500s to start to occur is just because of you hitting that error level.
This can be confirmed if you check and confirm that 500s that you're getting are the ones with "429 (...)" message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants