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
min.
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.
I'm afraid I no longer use this forum due to the new point allocation system.
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?
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:
In the Connections pane, expand the server node and click
Application Pools.
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
Finish.
Best regards
Angie
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
19 Points
290 Posts
Find bottleneck in ASP.NET webform application
Nov 29, 2013 05:26 AM|SnowJim|LINK
Hi,
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 min.
How do I find the problem?
BestRegards
All-Star
37441 Points
9076 Posts
Re: Find bottleneck in ASP.NET webform application
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.
Member
19 Points
290 Posts
Re: Find bottleneck in ASP.NET webform application
Nov 29, 2013 06:30 AM|SnowJim|LINK
Okay, but how do I handle cache in this case?
Contributor
2210 Points
709 Posts
Re: Find bottleneck in ASP.NET webform application
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.
Mahedee
Blog: http://mahedee.net/
Online Tech Share
Member
19 Points
290 Posts
Re: Find bottleneck in ASP.NET webform application
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.
Member
19 Points
290 Posts
Re: Find bottleneck in ASP.NET webform application
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?
All-Star
32817 Points
3815 Posts
Re: Find bottleneck in ASP.NET webform application
Dec 08, 2013 04:15 AM|Angie xu - MSFT|LINK
Hi SnowJim
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 Application Pools.
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 Finish.
Best regards
Angie
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.