Our memory leaks?

Discussion in 'ASP .Net' started by James Hunter Ross, Oct 20, 2005.

  1. Friends,

    I've been watching or W3WP process size (using Task Manager), and it grows
    and grows when using our application. I am the only one on our server. I'll
    end my session, either through timeout or logout, and the process size never
    goes down. I could understand that if the next time I logged in the size
    didn't change, implying that the process was big but had "headroom". But,
    things start growing again.

    I guess that we have leaks! I didn't think it was easy for a ASP.NET/C#
    implmentation to leak? I've seen bad programming where a reference is held
    so an object lives longer than one might expect, but once an object is
    destroyed, (such as when the Session goes away), it should be freed.

    Should I conclude that my app is leaking in an extreme way? How might I
    ever find these things, the code looks good to us?

    A friendly word or two will be very much appreciated. Thanks in advance!

    James
     
    James Hunter Ross, Oct 20, 2005
    #1
    1. Advertising

  2. James Hunter Ross

    Jeff Siver Guest

    I believe that what you are seeing is normal. The memory requested by
    ASP.NET stays allocated to it. When garbage collection runs, the memory is
    marked as available but ASP.NET doesn't return the memory to the operating
    system, it keeps it so that it can be allocated to later tasks.

    "James Hunter Ross" <> wrote in message
    news:...
    > Friends,
    >
    > I've been watching or W3WP process size (using Task Manager), and it grows
    > and grows when using our application. I am the only one on our server.
    > I'll end my session, either through timeout or logout, and the process
    > size never goes down. I could understand that if the next time I logged
    > in the size didn't change, implying that the process was big but had
    > "headroom". But, things start growing again.
    >
    > I guess that we have leaks! I didn't think it was easy for a ASP.NET/C#
    > implmentation to leak? I've seen bad programming where a reference is
    > held so an object lives longer than one might expect, but once an object
    > is destroyed, (such as when the Session goes away), it should be freed.
    >
    > Should I conclude that my app is leaking in an extreme way? How might I
    > ever find these things, the code looks good to us?
    >
    > A friendly word or two will be very much appreciated. Thanks in advance!
    >
    > James
    >
     
    Jeff Siver, Oct 20, 2005
    #2
    1. Advertising

  3. James Hunter Ross

    Bruce Barker Guest

    actually they are pretty easy to get.

    you need to determine if you are leaking managed or unmanaged memory.
    failing to call dispose on component objects or not calling
    Marshal.ReleaseComObject() on com objects is a sure way to "leak" unmanaged
    memory. managed memory "leaks" happen when too much data is stored in inproc
    sessions (takes 20 minutes to be released), statics holding references.

    here is an article to get you started:

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/dbgch02.asp

    -- bruce (sqlwork.com)


    "James Hunter Ross" <> wrote in message
    news:...
    > Friends,
    >
    > I've been watching or W3WP process size (using Task Manager), and it grows
    > and grows when using our application. I am the only one on our server.
    > I'll end my session, either through timeout or logout, and the process
    > size never goes down. I could understand that if the next time I logged
    > in the size didn't change, implying that the process was big but had
    > "headroom". But, things start growing again.
    >
    > I guess that we have leaks! I didn't think it was easy for a ASP.NET/C#
    > implmentation to leak? I've seen bad programming where a reference is
    > held so an object lives longer than one might expect, but once an object
    > is destroyed, (such as when the Session goes away), it should be freed.
    >
    > Should I conclude that my app is leaking in an extreme way? How might I
    > ever find these things, the code looks good to us?
    >
    > A friendly word or two will be very much appreciated. Thanks in advance!
    >
    > James
    >
     
    Bruce Barker, Oct 20, 2005
    #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. ASP.Confused

    ASP.NET - Detecting memory leaks

    ASP.Confused, Jul 16, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    2,746
    Marina
    Jul 16, 2004
  2. =?Utf-8?B?RnJhbmsxMjEz?=

    Memory Leaks in ASP.NET

    =?Utf-8?B?RnJhbmsxMjEz?=, Mar 4, 2005, in forum: ASP .Net
    Replies:
    12
    Views:
    13,857
  3. Novice
    Replies:
    28
    Views:
    5,119
    Jon Skeet
    Jul 22, 2003
  4. Jon Skeet

    Re: Memory Leaks & Strings

    Jon Skeet, Jul 30, 2003, in forum: Java
    Replies:
    0
    Views:
    461
    Jon Skeet
    Jul 30, 2003
  5. Replies:
    4
    Views:
    127
Loading...

Share This Page