ASP.NET - Detecting memory leaks

Discussion in 'ASP .Net' started by ASP.Confused, Jul 16, 2004.

  1. ASP.Confused

    ASP.Confused Guest

    How would I go about detecting a memory leak? My web hosting provider has
    our site set up to only have a root "bin" folder for .NET apps, and I would
    like to be able to watch how much memory is being allocated for the entire
    site (since the site acts as one big application.) Is there anyway to do
    this through code?

    The reason I ask is because occasionally, our site will start having session
    state loss. After a day or two, it goes back to normal. My session
    timeouts are 20 minutes, and I try to make sure that I properly
    destroy/deallocate my variables (I also use GC.Collect heavily in my apps to
    catch anything that I didn't notice.)
     
    ASP.Confused, Jul 16, 2004
    #1
    1. Advertising

  2. ASP.Confused

    bruce barker Guest

    if you use 2003, you can setup a seperate pool for an application, and
    monitor its memory usage. you can also download the win32 debugger and
    instal the sos package. this will allow you to dump the gc.

    you need to look for managed and unmanged leaks. managed leaks are generally
    due to storing data in statics.

    -- bruce (sqlwork.com)

    "ASP.Confused" <anonymous@> wrote in message
    news:...
    > How would I go about detecting a memory leak? My web hosting provider has
    > our site set up to only have a root "bin" folder for .NET apps, and I

    would
    > like to be able to watch how much memory is being allocated for the entire
    > site (since the site acts as one big application.) Is there anyway to do
    > this through code?
    >
    > The reason I ask is because occasionally, our site will start having

    session
    > state loss. After a day or two, it goes back to normal. My session
    > timeouts are 20 minutes, and I try to make sure that I properly
    > destroy/deallocate my variables (I also use GC.Collect heavily in my apps

    to
    > catch anything that I didn't notice.)
    >
    >
     
    bruce barker, Jul 16, 2004
    #2
    1. Advertising

  3. ASP.Confused

    Marina Guest

    I don't know about the memory leaks, but you are properly killing your
    performance if you are calling GC.Collect all the time. Microsoft does not
    recommend that you call this yourself - especially often.

    "ASP.Confused" <anonymous@> wrote in message
    news:...
    > How would I go about detecting a memory leak? My web hosting provider has
    > our site set up to only have a root "bin" folder for .NET apps, and I

    would
    > like to be able to watch how much memory is being allocated for the entire
    > site (since the site acts as one big application.) Is there anyway to do
    > this through code?
    >
    > The reason I ask is because occasionally, our site will start having

    session
    > state loss. After a day or two, it goes back to normal. My session
    > timeouts are 20 minutes, and I try to make sure that I properly
    > destroy/deallocate my variables (I also use GC.Collect heavily in my apps

    to
    > catch anything that I didn't notice.)
    >
    >
     
    Marina, Jul 16, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jive

    Detecting memory leaks

    Jive, Nov 21, 2004, in forum: Python
    Replies:
    2
    Views:
    397
    Eddie Parker
    Nov 21, 2004
  2. Diego Martins
    Replies:
    4
    Views:
    336
    Diego Martins
    Oct 9, 2006
  3. Ilias Lazaridis

    Detecting memory leaks on apache, mod_python

    Ilias Lazaridis, Dec 17, 2007, in forum: Python
    Replies:
    14
    Views:
    608
    Ilias Lazaridis
    Dec 23, 2007
  4. Jerome Sui

    detecting memory leaks in Perl

    Jerome Sui, Jul 13, 2003, in forum: Perl Misc
    Replies:
    0
    Views:
    139
    Jerome Sui
    Jul 13, 2003
  5. Replies:
    5
    Views:
    1,067
Loading...

Share This Page