470,849 Members | 1,129 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,849 developers. It's quick & easy.

Initial Load slow on IIS6

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
Nov 3 '08 #1
5 3955
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)

Med wrote:
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

Nov 3 '08 #2
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

"bruce barker" <no****@nospam.comwrote in message
news:eq**************@TK2MSFTNGP02.phx.gbl...
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)

Med wrote:
>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
Nov 3 '08 #3
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.
"Med" <no****@nospam.nospamwrote in message
news:%2***************@TK2MSFTNGP05.phx.gbl...
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

Nov 3 '08 #4
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
"George" <no*****@comcast.netwrote in message
news:et**************@TK2MSFTNGP03.phx.gbl...
>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.
"Med" <no****@nospam.nospamwrote in message
news:%2***************@TK2MSFTNGP05.phx.gbl...
>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

Nov 3 '08 #5
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.


"Med" <no****@nospam.nospamwrote in message
news:eP**************@TK2MSFTNGP06.phx.gbl...
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
"George" <no*****@comcast.netwrote in message
news:et**************@TK2MSFTNGP03.phx.gbl...
>>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.
"Med" <no****@nospam.nospamwrote in message
news:%2***************@TK2MSFTNGP05.phx.gbl...
>>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

Nov 3 '08 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Ian Murphy | last post: by
11 posts views Thread by John Bailo | last post: by
1 post views Thread by Daniel | last post: by
1 post views Thread by danrostron | last post: by
4 posts views Thread by Alex Maghen | last post: by
3 posts views Thread by Starbuck | last post: by
1 post views Thread by buntyindia | last post: by
reply views Thread by David Jackson | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.