C#C
C#2y ago
oe

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:

Since using IIS I have had nothing but headaches. I have worked with Python/Flask, Gunicorn, Jenkins and its been a breeze, but I really wanted to make .NET work for my startup, so I've pushed on and on through headache and headache. I cannot for the life of me sort this last issue out.

Any help would be incredibly appreciated
Was this page helpful?