'asp.net core api first request slow after idletime on aws setup
I am using Angular + Asp.net Core 3.1 Web api which is integrated with OpenIDConnect using Cookie Authentication for the Single Sign on(OneLogin).I am not not using Identity. Angular is published on Asp.net core on IIS ( same domain) on aws setup(iis and sql server on separate box) Cookie expiration is 7 hours as configured in Startup.cs. App Pool is set to Always Running and Process Idle time = 0, Idle timeout action suspend On the Application Preload enabled is true.
I am facing the issue where after every certain idle time (like 5 min that too randomly), when i refresh the home page, api calls take long to complete for the first request, I check the query execution time for these calls in profiler and they are fast.
When I run the same app with same app pool settings on a server having both IIS 10 and sql server, I face no so issue and loading is fast throughout the day.
What could be causing the api calls to be slow? What can be best way to fix this.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
