Reputation: 271
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!
Upvotes: 4
Views: 632
Reputation: 16984
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.
Upvotes: 2
Reputation: 11223
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?).
Upvotes: 2