We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

ARR+NLB slow response on initial request(s)RSS

4 replies

Last post Oct 11, 2017 04:10 AM by Rovastar

  • ARR+NLB slow response on initial request(s)

    Oct 10, 2017 02:16 PM|R. Brink|LINK

    Hi all,

    We have a serious issue on our ARR+NLB webfarm. Responding to the first request (the one that actually starts the application) is very slow.

    More specific: Each webserver in the farm responds very slow to the first request for an application that was just started. It takes 60 seconds and up to respond to a simple MVC page.

    Is there any logical explanation for why an initial request on an ARR+NLB webfarm takes much longer than on one of the webservers directly? I can't seem to find the cause of this. Anyone have any ideas/pointers?

    Best regards,
    Raymond

  • Rovastar Rovastar

    5495 Posts

    MVP

    Moderator

    Re: ARR+NLB slow response on initial request(s)

    Oct 10, 2017 02:31 PM|Rovastar|LINK

    What setting do you have for the application pool for it? Idle time out?

    By design IIS has to spin up a new worker process when one is not running.

    Try leaving teh app pool always on. e.g. no idle timeout value

    Troubleshoot IIS in style
    https://www.leansentry.com/
  • Re: ARR+NLB slow response on initial request(s)

    Oct 10, 2017 03:08 PM|R. Brink|LINK

    We use the default settings for now. I do understand the apppool is recycled after a certain idle time. It is the proces of starting the apppool that is extremely slow. I know I could change the settings, but for comparison sake I'm not going to.

    We are talking about a big machine, usually spinning up applications in a matter of seconds. This application doesn't do anything special compared to others during app start, afaik.

    What I just did discover though is that a request for a simple HTML page as a first request on the cold apppool is actually very fast! So it must be something in the MVC pipeline that is slow, right?

  • Re: ARR+NLB slow response on initial request(s)

    Oct 11, 2017 04:09 AM|Yuk Ding|LINK

    Hi R.Brink,

    Asp.net application need to be initalizaed everytime the first request call the application. So that's why asp.net so slow but html so fast. So if you need to improve the performance, you could set application initalization:

    https://docs.microsoft.com/en-us/iis/get-started/whats-new-in-iis-8/iis-80-application-initialization

    As rovastar said, leave the application pool always on could improve the performance.

    Best Regards,

    Yuk Ding

    Yuk Ding

    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue.
  • Rovastar Rovastar

    5495 Posts

    MVP

    Moderator

    Re: ARR+NLB slow response on initial request(s)

    Oct 11, 2017 04:10 AM|Rovastar|LINK

    You seem to be talking about the backend servers now and not the ARR server worker processes.
    If you are talking about your web server then different sites/apps can have different start times. There are a load of reasons for this. You will likely have to understand the code to get a complete picture.

    Have a look at application initialization that may help too
    https://docs.microsoft.com/en-us/iis/get-started/whats-new-in-iis-8/iis-80-application-initialization
    Troubleshoot IIS in style
    https://www.leansentry.com/