1st page takes a long time to open

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
15 年 前
Hi, I have noticed that the first page that i open takes over 1 minute to open, then from there on approx 1-2 seconds.Then the following day i will clear my browser cache then the same fault happens again, can anyone help me resolve this 1 minute delay please.
15 年 前
There is a reason for this and it is due to the code having to be compiled on the server to display the pages. This happens whenever IIS clears the cache or the application recycles after a period of time after no activity. Once its done this initial compile each subsequent compile is fast.

Also, check that compilation debug isn't set to true in the Web.Config in your production environment. It should only be set to true when debugging on your development server or your local machine when coding/building etc... Otherwise, each time a page is accessed debug symbols will be loaded into your live site and effectivley all the code will compile on each request, causing it to be slower.

It might be worth checking asp.net or MSDN if you want info on the process cycle of an ASP.NET Application, helps to explain the process which IIS follows to compile an ASP.NET site.

Hope that explains it for you.

Andy
15 年 前
Hi, Thanks Andy.

I have double checked my web.config and it is set to <compilation debug="false">
have you any other ideas that i can try?
or can anyone else help please?
15 年 前
I sent email to you, hope your response, thanks again.
15 年 前
If you in a production environment this is less likely to be an issue since you will (hopefully) get enough traffic to your site to keep IIS from recycliing.

You can of course simulate page requests in order to keep your site *alive*. You can create a simple app that submits a web request to your site every x minutes or you can google "SmarterPing" and download this utility.

Best thing is to create a new page "Ping.aspx" on your site with theme disabled that does something simple like outputs the current datetime. Then just point the utility at this uri.

Hope this helps,
Ben
15 年 前
If you have access to your IIS Application pool settings, you can also go into the properties of the app pool that is running your storefront and change a few settings in there.  On  the performance tab, there is an idle timeout option.  I personally unchecked it so it doesn't shutdown the app pool if it's idle.  By default it's set to 20 minutes, so you could also just increase that number as well.  There are some other options on that tab that you can tweak to suit your site better.
15 年 前
Hi, thanks all

jasonliu i would be grateful if you could send me your email again (or post) if possible, as i have not yet recieved it thanks.
Regarding 'IIS Application pool settings' im on shared hosting, is it possible my hosting company have got these settings you mention incorrect and/or not set for best performance(default maybe)?.Can i use 'SmarterPing' on shared hosting?  Thanks again
15 年 前
SmarterPing is a windows service so just needs to be installed on a PC with an internet connection.
15 年 前
Hi,
Ive installed it and its up and running.
Are you aware of anything else that i can use other than 'SmarterPing' a package/script that i can place in my webspace, its just isnt practical to use this from my desktop computer.Any help would be great.
15 年 前
HI,
My hosting company supports a web schedule program that can run scripts at set times, can anyone help me with a script that will compile my site when the script is run.Or is there any other way? Any help would be great.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.