…so I’m assuming it’s very likely just me, or perhaps a small subset of users who are affected.
The question I have: is how do I troubleshoot? In a case like this I’d normally try restarting my app and see if that fixes things, but haven’t had much luck there.
I’ve looked high and low in the dashboard for things I can try, but no luck. Doe anyone have any suggestions? I feel as though I am missing something trivial.
Can anyone see the flaw here? Yep, turns out that doing a regular sleep() in an asynchronous app causes the entire app to come to a stop. So if I sleep for 5 seconds, I just added 5 seconds to every other API call.
Here is the correct way to sleep in FastAPI:
await asyncio.sleep(x)
That will put that specific request to sleep for the chosen amount of time, and no other requests will be affected.