99% of you our fastapi requests are in the <500ms response time range. Yet we regularly see single requests that time out with no real pattern. From application insights we do not get a stacktrace or any info on what went wrong within our code. The "work" and logic the backend has to go through for generating the response is minimal, so we can't figure out why it fails sometimes.
How can we find the root cause of the timeouts?
Here is the information we see in Application insights:
EXCEPTION
Microsoft.Azure.WebJobs.Host.FunctionTimeoutException
Exception Properties
Show all
Event time 9/7/2022, 3:17:14.757 PM (Local time)
Message Timeout value of 00:05:00 was exceeded by function: Functions.app
Exception type Microsoft.Azure.WebJobs.Host.FunctionTimeoutException
Failed method Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor+