Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does my ASP.Net site running under IIS7 take so long to load after a period of inactivity? [duplicate]

An ASP.NET webpage will take maybe 10 seconds or so the first time the page is loaded, which is understandable since stuff is getting JIT'ed and app domains being loaded, etc. The next requests take only half a second or so. However, if no one hits the site for a few hours, the first request after such a period of inactivity will take 10 or 20 seconds again.

It's as if IIS gets bored and unloads a bunch of crap. How do I get it to not do this? I want the site to always be fast, even if I don't get a lot of traffic.

This is a dedicated web server, there are no users logged on and no other user-mode applications running. The's several gigs of memory available so nothing should be paged out to disk.

like image 777
Mike Christensen Avatar asked Oct 27 '10 14:10

Mike Christensen


People also ask

Why is my website loading slow on IIS?

An IIS or ASP.NET hang can cause your website to have slow page loads, timeouts, or 503 Service Unavailable errors. Hangs can be caused by blocked ASP.NET threads, bad configuration, or request queueing.

How to configure an ASP NET website on IIS?

Configure an ASP.NET Website on IIS. 1 Step 1: Install IIS and ASP.NET Modules. 2 Step 2: Configure ASP.NET Settings. 3 Step 3: Configure Data Source Settings. 4 Step 4: Configure Application Security. For planning information to review before deployment, see Plan an ASP.NET Website on IIS. For more ...

What causes an IIS website to hang?

An IIS website hangs whenever it appears to stop serving incoming requests, with requests either taking a very long time or timing out. It's generally caused by all available application threads becoming blocked, causing subsequent requests to get queued (or sometimes by the number of active requests exceeding configured concurrency limits).

Why does my website take so long to load?

Let’s get a deeper look at the major causes of the forever loading website. IIS is a web server from Microsoft that runs on the Windows server. Basically, IIS works based on application pools. These Application pools allow the website to have a separate pool from one another, even though they run on the same server. 1. Lack of resources


2 Answers

You can change the idle timeout settings.

like image 184
Brad Avatar answered Sep 22 '22 05:09

Brad


Have a look at the IIS7 application warmup extension.

http://www.iis.net/download/ApplicationWarmUp

like image 42
Bronumski Avatar answered Sep 21 '22 05:09

Bronumski