Hi ,

I am working for one in-house web application project with C#, ASP.NET and SQL Server 2005.

But here we are facing a issue for initial loading time of that application, it takes around 20 seconds to load it first time but after that it works fine,but again after 2/3 hours when we try to access same it is taking same long time.

I have tried all possible solution including optimization of code, indexing of tables and even asp.net pre-complication (aspnet_compiler.exe -v/ webapp name) on our deployment machine.

It is not even hardware issue as we have pretty high end servers as:
Code base deployment server
CPU Intel(R) Xeon 15160 @3.00GHz
RAM: 16GB
Database Deplument server
CPU Intel(R) Xeon E5345 2.33GHz
RAM: 32GB

Any resolution for that issue ?

Recommended Answers

All 4 Replies

It can be a lot of things, We cant tell because we dont know what are you doing on Page load, mybe if you can tell us a list of things that you do onpage load event and post some sniped code , then we can help you. :)

Its sounds like an Application Pool issue.

In IIS your application will be assigned an Application Pool. Whenever the Application Pool recycles itself the application will need recompiling when it is first run after the application pool recycle. Change the recycling interval for the application pool and this may fix your issue.

Hi Jamie ,

Thanks a alot for reply,
Ya it was issue with Application Pool in IIS,

Now i set the recycling interval timing as 5000 mins.
So it is working fine

Thanks again

Ajay

I was having the same issue with a shared hosting provider. I think this can happen a lot faster in the shared hosting environment, especially if a hosting provider has too many websites running on a server, because if a website sits for too long it goes into some type of hibernation to free up resources for other websites.

I switched from a very popular shared hosting provider because of this same issue. My websites were taking 10-20 seconds to load the first page, and then the website load times would be OK after the initial page load. It didn't matter what page it was. I experimented with setting up a program that would ping my website every couple of minutes from my home computer. This worked, but I didn't want to have to do this permanently. I've heard that another way to implement this ping method is to pay for a website monitoring service that pings your site to check for uptime, but the end result is the same (keeps your site awake).

I recently switched to , which is a clustered hosting provider (scalable on demand resource availability so no overstuffed individual shared server). I can't tell you exactly how they have their servers setup, but whatever they are doing they are doing it right. Now typical pages load in one or two seconds or less, with the first page load being just as fast!

As I'm sure you are aware, the ASP.NET code usually compiles on demand the very first time a page is loaded, but your issue sounds more like mine where after a certain amount of time a page that has been loaded previously loads very slow for the first time.

It is nice to finally learn the actual cause of this is the application pool recycling interval. I'm still glad I switched hosting providers, because I think it would have been a losing battle to try to get a shared hosting provider to change this server configuration.

Hope this helps,
Tom

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.