Long Time Response for API hosted on IIS

John Smith 1 Reputation point
2023-01-03T08:59:20.877+00:00

I have one app that is using ASP.NET API hosted on IIS.

  1. First time , when I call API using Postman, API returns very very slow (about 2 minutes).
  2. And then , i called this API and another APIs . but it is too fast.
  3. I wait for 30/50 minutes. And , I call one API . API returns very very slow (about 2 minutes) again.
  4. I searched on GOOGLE/StackOverFlow, and other page for solution. They suggested to change IDEL TIME-OUT, StartMode, IDEL TIME-OUT ACTION, PRELOAD ENABLE, and etc in IIS. I changed and restarted IIS.But, the issues is still.

So, how could I solve it? Could you give me the advice because I need urgent? Thanks you so much.

Windows development | Internet Information Services
{count} votes

1 answer

Sort by: Most helpful
  1. Lex Li 6,037 Reputation points Microsoft Employee
    2023-01-08T16:09:32.21+00:00

    That's exactly the cold start behavior of any web server because web apps need to warm up on demand before they can be ready to serve HTTP requests, not merely IIS, and mostly noticeably on a server that's not busy enough.

    So, if you observe it on a debug/dev environment, simply ignore it and there is nothing wrong yet.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.