Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Slow first page load on asp.net site

Every now and then (always after a long period of idle-time, e.g. overnight) when I access a site built using asp.net - it takes around 15 seconds to load the page (15 seconds before I see any progress whatsoever, then the page comes up fast).

Further pages on that site, or refreshes, are quick as usual - they are also fast on other machines, only the first one seems to take the 'hit'.

Page tracing never through anything up (whole cycle was a fraction of a second)

So my question is where else should I be looking? Perhaps IIS? Or could it still be my asp.net app and I'm just looking in the wrong place (the trace) for clues?

As I don't have much control over the IIS server, anything I can check through asp.net would be more helpful, before I go ask that particular admin.

cheers :D

like image 844
Tabloo Quijico Avatar asked Jan 20 '10 15:01

Tabloo Quijico


People also ask

Why are ASP Net Applications slightly slower on first load?

Typically an application will always take a little extra time to load as the application domain starts up. Things helping exacerbate this could be anything from poorly written code (IE: Application_Start) to certain libraries you may be using (ORMs for example). How many modules do you have loaded?

Why is my asp website loading so slow?

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.

Why is my IIS hosted site so slow on first load?

This means that the first time you access the page, a worker process is being established and the program is created. The first user to log into the website after the any of the following changes will experience a slow load time due to NetCommunity establishing this worker process within IIS.


1 Answers

The IIS application pool is shut down after 30 minutes of inactivity. After that, when you make a request IIS basically has to start the website up again, which leads to the behavior you are describing. You can change the idle time of your website in iis though to avoid it.

like image 111
Klaus Byskov Pedersen Avatar answered Oct 10 '22 10:10

Klaus Byskov Pedersen