Initial Load slow on IIS6

M

Med

Hi,

Initial load of my pre-compiled ASP.NET app takes more than 50 seconds to
load after site has been idle for a while. Then it become
fairly fast. Followings are my app/hardware configs:


Server/IIS:
-----------
IIS 6 running on Hosted VPS Windows 2003 Enterprise, with allocated 512MB
RAM. Lots of memory still available when my app runs. CPU usage is low too.
Application pool default settings.


ASP.NET:
--------
ASP.NET 3.5 using "StateServer" service.


Initially I thought delay was caused by SQL connection, so I created a blank
asp.net app, with one page (default.aspx) only. This page does not try to
connect to SQL on load. It only does this when a button on default.aspx is
clicked which calculates connection time.


When I tried to load default.aspx, it still took more than 50 seconds to
load. Considering there is no code to run when this page loads. SQL
Connection takes less than 7 millisecond to execute. So SQL connection is
not source of the problem.


Does anyone knows possible cause of this delay? I think it is asp.net/IIS
related or might have something to do with app pooling or "StateServer"
service perhaps?



Thanks for your time.


Kind Regards


Med
 
B

bruce barker

the first time a page is hit a lot happens, an appdomain is created, and
all .net dll's in the bin folder are loaded and converted from il code
to native code (jit). a recycle will cause the same behavior.

if you have a lot of pages, a precompiled site (or a web application,
which precompiles the codebehinds) may take longer to load then a source
only site which only has fewer dll's in the bin and only has to load the
page and any controls defined in the web.config.

note: there is a il compiler (ngen.exe), but it will not work with asp.net


-- bruce (sqlwork.com)
 
M

Med

Hi Bruce,

Thanks for replying. But as I mentioned my test application has only one
page with nothing to run on load or global.asax! I think 50+ seconds load
time is way too long for pre-compiled application and users will navigate
away from the site!

Regards

Med
 
G

George

I would agree with you that 50 sec is inapropriate.
I have fairly large application (http://www.mspiercing.com) and it takes no
more than 2 seconds to load...

Check what you are doing in
1. Application_BeginRequest in global asax
2. Any modules/handlers you have.... they will initialize as well. So if you
have time consuming code there it will slow things down...


George.
 
M

Med

Hi,

I think this is asp.net process/IIS/pooling related. I don't have anything
in Application_BeginRequest, modules etc. Its a blank asp.net app with only
one aspx page to calculate sql connection time on button_click.

Med
 
G

George

Can you check event log then?

from my experience it's problem with antivirus (or some other security
software).
When application is compiled/getting ready ASP.NET creates bunch of temp
DLLs for it. And if antivirus tocuhes them it forces application to be
recompiled....
Check event log... It might have a clue to what is going on.

George.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top