Requests to .well-known/jwks.json randomly timing out

Hi there. We regularly running into requests to the .well-known/jwks.json endpoint timing out after 60 seconds or longer. Initially I thought this might be a rate limiting issue but I tried to hit that limit on purpose (sending 100s of requests per second to that endpoint) without any luck. Also in the rate limiting case I would expect an error code from the API so this doesn’t seem to be the case here. It looks rather like the request really never completes. Do you have any idea what could be causing this?

The latest occurrence was at Jan 28, 2022 7:27:30 AM UTC where the request timed out after 60 seconds on our client.

Is this something we have to expect to happen (and all libraries that fetch this also have to be aware of this possibility) or is it a problem on your side?

Hi @igin

First: why are you hitting that endpoint often? You should be caching the keyset and almost never hitting that endpoint.

A timeout can be caused by many things, not necessarily related to Auth0, such as network congestion in the middle of the route. I haven’t heard this before, so it probably isn’t the Auth0 endpoint failing, though that is not conclusive.

First, check why you are calling this endpoint so much, truly it should only be called once and the result cached.


Ok I get that. Sadly this isn’t really in our control as we are using a thirdparty authentication library which does those requests (social-core/ at master · python-social-auth/social-core · GitHub). I guess we should create an issue on their side to avoid too many of those requests and better handle errors (especially timeouts).