Long Delay in initial load of ASPX pages

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've just moved to a new hosting company which provides me a "Virtual
Dedicated Server" running Windows Server 2003/ASP.NET 2.0.

My site is not pre-compiled and, at least for now, I'd prefer that it stay
that way. I have ASPX pages with .CS code-behinds and I have a bunch of .CS
class files in the APP_CODE diredctory of my application.

Everything runs fine but I have an interesting problem: When I go to the
site for the first time in a few hours (or to a specific page I haven't
visited for a few hours), it takes a long time (5 or 6 seconds) for the page
to come up. Then, immediately after that, the page will load perfectly fast.
Then, again, a few hours later, it'll take a long time to load.

I'm not doing any kind of fancy data caching or anything that should be
causing this. So, if I'm not tocuhing the source files (.aspx, .cs, etc.),
what's causing the delay? Is it JIT recompiling again? If so, why? Is there a
trick for determining when my application or one of its classes/pages was
last compiled? Is there a system setting somewhere which causes the thing to
clear the compiled objects?

Alex
 
without all the technical mumbo jumbo: your app is unloading. See if
your provider has a URL task scheduler. Then you could just have it
hit your main page every so often to keep it loaded. That will solve
your problem.
 
Thanks for this. So I checked and it's only recycling every 29 hours. So it's
not that. But then I noticed "Shutdown Worker Processes after being idle
for..." item under the "performance" tab. That's set to 20 minutes. But does
that also cause the application to be "unloaded"?

Alex
 
Alex said:
Thanks for this. So I checked and it's only recycling every 29 hours. So it's
not that. But then I noticed "Shutdown Worker Processes after being idle
for..." item under the "performance" tab. That's set to 20 minutes. But does
that also cause the application to be "unloaded"?

Alex

Hi Alex,

Yeah, you normally have to tune both of them. Twenty minutes is pretty
short but it does help conserve resources on the server. If you have a
solid application then it may be ok to assign a dedicated app pool and
uncheck both of them. However, I recommend letting the recycle WP
run every 48 hours.

Regards,

Robert
 
Back
Top