locked
Find bottleneck in ASP.NET webform application RRS feed

  • Question

  • User-1293365197 posted

    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

    Friday, November 29, 2013 5:26 AM

Answers

  • User-166373564 posted

    Hi SnowJim

    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 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

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, December 8, 2013 4:15 AM

All replies

  • User-760709272 posted

    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.

    Friday, November 29, 2013 5:29 AM
  • User-1293365197 posted

    Okay, but how do I handle cache in this case?

    Friday, November 29, 2013 6:30 AM
  • User1079421601 posted

    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.

    Friday, November 29, 2013 7:15 AM
  • User-1293365197 posted

    Thanks, but this is in a webhost environment so I can´t install och manipulate the operatingsystem.

    Friday, November 29, 2013 7:51 AM
  • User-1293365197 posted

    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?

    Saturday, November 30, 2013 9:28 AM
  • User-166373564 posted

    Hi SnowJim

    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 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

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, December 8, 2013 4:15 AM