views:

143

answers:

3

I have a Web application (http://www.holidaystreets.com), it has around 120,000+ pages. Whenever we restart the server it takes more then 15 minutes for the site to warm up. I built it as 'Release', do not have any heavy stuff initilizing (i.e. Control Adapters or in APPInit). Any tips?

Mystery Solved Well I spoted the problem today. This application was converted from WebSite type project to WebApplication type. I had codedom defined in web.config so that I can compile each page separately when requested first time. (this was done becuase we had such a huge number of pages). However in WebApplication it was compiling each and every page on first load. Since removing the section, the application is loading in less then 2 seconds!

+1  A: 

Probably you have lots of static data that a initiated on the first hit. Look for big amount of cached data, that you use in static classes (probably getting it from the db?).

anthares
15 minutes is still a heck of a long time ...
Randolph Potter
If he is loading some big that from db or even web service (like nomenclatures, for example) it could do the trick. I'm experiencing the same problem, but that's the trade off - cache for long start-up application time. At least only this can be told with out close look up of the code and proper timestamp logging, to see where are the bottle-necks.
anthares
No guys, I have minimised things loading initially. It only needs 3 appsettings when it starts. However the main page has Offers section which loads from an XMl file located on the root folder. I do not think that is causing problem as I tried after removing the control from the page as well
Usman Akram
**Mystery Solved**Well I spoted the problem today. This application was converted from WebSite type project to WebApplication type. I had codedom defined in web.config so that I can compile each page separately when requested first time. (this was done becuase we had such a huge number of pages). However in WebApplication it was compiling each and every page on first load. Since removing the section, the application is loading in less then 2 seconds!
Usman Akram
A: 

I got it back in 2.65s:

http://www.webpagetest.org/test

IrishChieftain
+1  A: 

I would suggest using the System.Diagnostic.Trace class methods to log timings for various methods and events as your site is loading up for the first time to see where the time is being spent. Also profiling your database should reveal any bottlenecks there.

Andy Rose