IIS Cold Start / State Issues After 10 Minutes
I'm having "cold start/state" issues with my IIS (& ASP.NET Core API). After around 10 minutes of idleness, if I make a request to my IIS, I get issue "curl: (6) Could not resolve host: curl. curl: (56) Recv failure: Connection was reset" OR on Fiddler "HTTP/1.1 504 Fiddler - Receive Failure". After making that request, if I make more requests, it works fine. It's just the first request that doesn't work.
I have tried everything I have found: StartMode to AlwaysRunning, doAppInitAfterRestart (preload) with a non authenticated controller/endpoint, setting application pool idle timeout to 0 (and process suspended instead of terminated), disabling application pool recycling (set to 0)
Extra context in case it helps:
Any help would be incredibly appreciated
I have tried everything I have found: StartMode to AlwaysRunning, doAppInitAfterRestart (preload) with a non authenticated controller/endpoint, setting application pool idle timeout to 0 (and process suspended instead of terminated), disabling application pool recycling (set to 0)
Extra context in case it helps:
- I am using BasicAuthentication (configured in code) - https://raw.githubusercontent.com/cornflourblue/aspnet-core-basic-authentication-api/master/Helpers/BasicAuthenticationHandler.cs
- I am using Entity Framework Core & SQL Server (injected into the controller from the endpoint I am calling)
- I am using IIS on Win Server 2022. Jenkins for CI/CD. Don't use linux because I have unit tests with Selenium/Chrome automations, which I want to be able to see in action. Don't use Kestrel since I have found it really hard to integrate with Jenkins (for start/stop), and since I like hosting my Angular app in the same "context/program"
Any help would be incredibly appreciated