I've encountered a peculiar issue in both my preproduction and production environments (but not in development).
My website performs various operations on a Web Api that is hosted on the same IIS server.
Typically, a specific POST request is processed in under a second. However, after 3 minutes of inactivity, the same POST request can take anywhere from 10-30 seconds to complete (as observed in the Google Chrome network tab).
It's important to note that this POST request is not the first in the sequence of requests being made.
The request is made using Ajax.
I've used SQL profiler to check if database queries are running slow, but they all appear to be performing well. It seems that the delay is happening after the SQL queries have been executed, with a pause of 10-30 seconds before the response is received.
Any insights on why the response time is significantly delayed?