473,569 Members | 2,751 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

It takes around 30~60 seconds to load a aspx site for the first time.Why?

I have a .Net website hosted on another IIS6.0. Whenever I tried to
access my website after a long time, it will take forever to load, my
browser will just show a blank white page and the progress bar is
loading so slow. However after it is loaded, the subsequent pages is
loaded up almost instantly. And even after i close my IE and reopen
again and load up the website again, it is still instantly loaded up.

Somehow the problem only appear after the website is not access for a
long period. How can i solve this problem? My IIS server is always on.

Thanks.

Nov 18 '05 #1
2 2206
Okay.

A page is not a page any more in the sense of what it used to be in classic
ASP
Its a class and you instantiate an object of it when you make a request.

The way ASP.NET works is that if there is no compiled copy of the code....
the first request would essentially JIT compile the bits of assembly that
are needed.
The part that is JIT compiled depends on what run time feels you are going
to be using. That is the reason y after the first run you app runs like a
treat.
If however you do not use your app for a long time... the JIT'd version is
discarded and the next request causes JIT on your assembly to create a
native copy again.
If you do not change you code over and over, then you might want to give
ngen.exe a try.
NGen essentially does a full native compilation of your assembly and every
time a call is made to the assembly a check is made to see if there is an
existing compiled version. If you have NGen'd your assembly that would
always hold true.

But also keep in mind that native compiled assemblies are heavier.

--
Regards,

HD

"Shige" <ex*****@yahoon ospam.com> wrote in message
news:3f******** **@news.tm.net. my...
I have a .Net website hosted on another IIS6.0. Whenever I tried to
access my website after a long time, it will take forever to load, my
browser will just show a blank white page and the progress bar is
loading so slow. However after it is loaded, the subsequent pages is
loaded up almost instantly. And even after i close my IE and reopen
again and load up the website again, it is still instantly loaded up.

Somehow the problem only appear after the website is not access for a
long period. How can i solve this problem? My IIS server is always on.

Thanks.

Nov 18 '05 #2
>If you do not change you code over and over, then you might want to give
ngen.exe a try.
ngen is mostly a bad idea outside of a web app but frequently a very, very
bad idea within the confines of the an asp.net application.

Here is why:
NGEN cannot make any assumptions for optimization for the run-time
environment than that of the JIT because the JIT is actually running in the
context of the execution environment. That alone causes NGEN to produce
sub-optimized code, if not inefficient.

Secondly, strongly named assemblies derive absolutely no benefit from NGEN
since NGEN makes an assumption on domain neutrality only for mscorlib.
Strongly named assemblies are always loaded domain neutral so the NGEN'd
file is never used to begin with.

I'd recommend instead that the startup code be streamlined to run lean and
mean reducing start up times. For instance, I sincerely doubt that JIT'ing
is responsible for this delay solely. Maybe the application is attempting to
acquire resources or initializing structures which may be contributing
heavily to this delay. Without inspecting the start up times, it is unfair
to blame it on the JIT.

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/2bz4t
"Hermit Dave" <he************ @CAPS.AND.DOTS. hotmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. .. Okay.

A page is not a page any more in the sense of what it used to be in classic ASP
Its a class and you instantiate an object of it when you make a request.

The way ASP.NET works is that if there is no compiled copy of the code....
the first request would essentially JIT compile the bits of assembly that
are needed.
The part that is JIT compiled depends on what run time feels you are going
to be using. That is the reason y after the first run you app runs like a
treat.
If however you do not use your app for a long time... the JIT'd version is
discarded and the next request causes JIT on your assembly to create a
native copy again.
If you do not change you code over and over, then you might want to give
ngen.exe a try.
NGen essentially does a full native compilation of your assembly and every
time a call is made to the assembly a check is made to see if there is an
existing compiled version. If you have NGen'd your assembly that would
always hold true.

But also keep in mind that native compiled assemblies are heavier.

--
Regards,

HD

"Shige" <ex*****@yahoon ospam.com> wrote in message
news:3f******** **@news.tm.net. my...
I have a .Net website hosted on another IIS6.0. Whenever I tried to
access my website after a long time, it will take forever to load, my
browser will just show a blank white page and the progress bar is
loading so slow. However after it is loaded, the subsequent pages is
loaded up almost instantly. And even after i close my IE and reopen
again and load up the website again, it is still instantly loaded up.

Somehow the problem only appear after the website is not access for a
long period. How can i solve this problem? My IIS server is always on.

Thanks.


Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2911
by: John | last post by:
I am trying to create thumbnails from 2500 pictures. But I always get a Maximum execution time of 30 seconds exceeded" at the statement with the method with imagejpeg or imagedestroy after processing and creating 500 thumbnails. Is there anything I can do to avoid this error? Thank you John
3
1709
by: Dan | last post by:
Hi all! When I throw my custom Exception class the first time in my code, the compiler takes a lot of time for find the following catch EX: try Throw New MyCustomException("test")
16
2089
by: varois83 | last post by:
Hi I hear to set the css width property at 774px which is good for all resolutions. What are you using? Thanks a lot Patrick
1
5216
Ajm113
by: Ajm113 | last post by:
Ok, I want to know how do I have a cookie expire 30 seconds? I am very new to Javascript and I want to learn more of it before I start jumping into work for people. So I got a book today that teaches cookies and stuff like that so I want to have it if the user submits a site which will run into a script that will see if the user does not have a...
0
1140
by: Phonon | last post by:
Hi All, I'm a little new to .NET and I'm having a threading issue I'm having a problem resolving/understanding. I'm making a plug-in into Word. A menu-option ('Check Updates') spawns a new thread which gathers information, and then displays a form (modal, 'ShowDialog'). Once the form is Close() 'd, it tries to run a system process -...
3
10067
by: lawrence k | last post by:
This is weird. When I use getId3 to try to read meta tags out of multimedia files, I get this error: Fatal error: Maximum execution time of 30 seconds exceeded in /home/ httpd/vhosts/bluewallmultimedia.com/httpdocs/getid3/getid3/ getid3.lib.php on line 54 But if I run phpinfo(), I get this:
2
2736
by: Bill Davidson | last post by:
All: I have a Win32 service that takes about 30 seconds to shutdown (give or take a few seconds). I shut the service down via the 'Services' console on Windows Server 2003. When the service shuts down in under 30 seconds, everything is fine. However if the service takes over 30 seconds to shut down, I get the following error in the...
4
20053
by: moyoal | last post by:
Dears, Help me how to create a ageing report for 30 days,60 days and 90 days, anyone can help me to have standard select query. Opening Balance 30 days 60 days 90 days thanks in advance,
3
2388
by: inetquestion | last post by:
How do you enable javascript to execute a given function every X seconds, which is not dependant on any user input? -Inet
0
7694
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8118
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7666
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5504
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2107
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
936
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.