0

We have a long time response for first time request call to Web API !

in spite we have changed the following Settings of WEB API's pool -and then we noticed a noticeable progress for the number of times for waiting time is decreased - :

StartMode To AlwaysRunning

Idle-Time-Out(minutes ) TO 0

But still having long time response for first time of the request, specially on the morning (before working time) or during weekend, what could cause this? any missing Settings you advice ?are there any other settings we need to change, to Run the pool automatically ? -snapshot of advanced settings below-

As it is look to me some how the IIS or Pool has been recycled periodically ! however I was thinking changing StartMode to "AlwaysRunning" will run automatically the Pool and keep it up and running even after recycle or shutdown !

BTW: the setting of Recycling /Regular time intervale is 1470 enter image description here !

enter image description here

JPNN
  • 383
  • 1
  • 7
  • 23
  • Use a performance profiler to analyze the initialization process of your web application. That should explain why it takes so long to respond to the first request and you can then reduce that to a moderate amount. All hacks on IIS settings just hide the real problem. – Lex Li May 25 '20 at 14:19
  • @Lex Li Users expect almost instant load/response. What you are saying is any application that does not start almost immediately is the real problem. I feel the real problem is that in a low traffic scenario this default behaviour by IIS is flawed, and needs tinkering. – Totoro53 Nov 26 '20 at 09:41

1 Answers1

0

It might relate to your ORM framework, such as Entity framework. See the below discussion.
How to "warm-up" Entity Framework? When does it get "cold"?
We need to install the Application Initialization Windows feature in order to make the Start Mode configuration take effect.
enter image description here
https://serverfault.com/questions/683017/first-request-after-a-while-always-slow-asp-net-mvc-iis-8-5-windows-server
Also, Precompiling website might be a good option to speed up first access.
Please check the below links.
Fixing slow initial load for IIS

Abraham Qian
  • 7,117
  • 1
  • 8
  • 22