Last post Dec 08, 2013 04:15 AM by Angie xu - MSFT
Nov 29, 2013 05:26 AM|SnowJim|LINK
I have a ASP.NET webform application based on .NET framework 4.0. On the first page I have a lot of usercontrol and all of them fetch data from a MySQL database. To avoid slow page load on the main page I am caching most of the controls and data.
The problem is that after about 10-15 min it will be slow to start up again. This suggests that the apppool is restarted but according to the webhotel it is not supose to restart more then once per 3 days. Thay belive that my website is crashing the apppool
and forces it to restart. I do however not find any exceptions of this in database.
I have tried using the profiler in Visual Studio 2013 but it is not playing nice with my website and all it gets is what dll files(winthing .net) that is the hot spot. I can´t find what method that is the slowest point. Anyway, I don´t think that profiler
is the best way to go here. I know that there is heavy dataload at first load but after this the website is running just fine until the recycle of the apppool. Im not sure if the apppool really recycles but Im sure that the webpage is slow starting every 10-15
How do I find the problem?
Nov 29, 2013 05:29 AM|AidyF|LINK
IIS will recycle your application when it feels it needs to, you have no real control over it. If you google you'll find articles that describe when your app could be recycled, it is quite an involved topic. Most likely scenarios are that it has been idle
or it's using too many resources.
Nov 29, 2013 06:30 AM|SnowJim|LINK
Okay, but how do I handle cache in this case?
Nov 29, 2013 07:15 AM|mahedee|LINK
Please configure web gardening to solve crashing of your IIS. For configuring web gardenging you can visit my blog
Then install httpzip it is a http compression software.
Nov 29, 2013 07:51 AM|SnowJim|LINK
Thanks, but this is in a webhost environment so I can´t install och manipulate the operatingsystem.
Nov 30, 2013 09:28 AM|SnowJim|LINK
The host have now checked there logs and thay say that the pool is restarting becouse of memory. Thay have a limit on 400 MB so my pages seems to hit this limit within just 10-15 min.
The question is how I best track down the problem in my development environment?
Dec 08, 2013 04:15 AM|Angie xu - MSFT|LINK
The host have now checked there logs and thay say that the pool is restarting becouse of memory. Thay have a limit on 400 MB so my pages.....
If you have an application that leaks memory, you can configure an application pool to recycle when the memory that is used by the W3wp.exe process reaches a configured threshold. Typically, you should set this value to be less than 60 percent of the available
physical memory on the server.
To configure an application pool to recycle after reaching maximum used memory:
Open IIS Manager. For information about opening IIS Manager, see
Open IIS Manager (IIS 7).
In the Connections pane, expand the server node and click
On the Application Pools page, select an application pool, and then click
Recycling in the Actions pane.
Select Private memory usage (in KB), and in the corresponding box type a memory value at which you want the application pool to recycle.
Click Next, select the events that should be logged when an application pool recycles, and then click