Native Memory leak? (Private bytes increases resulting in worker process recycling)

Discussion in 'ASP .Net Web Services' started by chen, Jun 28, 2007.

  1. chen

    chen Guest

    While investigating a possible memory leak scenario in one our web
    services, we ran into a peculiar situation where the "private bytes"
    of the worker process continued to increase steadily while the .NET
    CLR Memory counter '# Bytes in all heaps' remained constant. Pretty
    much all the documentation that we've read so far states that this
    points to native memory leak and is not a managed memory leak.

    So to test this theory further, i created the basic Hello World web
    svc & monitored the "private bytes" counter in perf mon/
    ProcessExplorer. The app pool was set to recycle when the "Maximum
    used memory (in MB)" set to 25. Sure enough, the private bytes used
    showed a steady increase and caused the app pool to recycle! What
    exactly is happening/leaking here? We've been struggling for the past
    3 days to eliminate unnecessary obj allocations and reached a stage
    where everything was commented but it still happened. Any ideas?

    Config:
    IIS 6.0 running on Windows Server 2003 (SP1).
    Hello World web svc in .NET 1.1 as well as .NET 2.0 displays the same
    behavior.

    Thanks
    chen
     
    chen, Jun 28, 2007
    #1
    1. Advertising

  2. Have you tried using any .NET Memory Profilers? They allow you to snapshot
    memory at different intervals and compare it.

    Try something like http://memprofiler.com/ or
    http://www.jetbrains.com/profiler/

    I have used both and I like the former and was helpful in troubleshooting a
    similar issue.

    - Pramod

    "chen" <> wrote in message
    news:...
    > While investigating a possible memory leak scenario in one our web
    > services, we ran into a peculiar situation where the "private bytes"
    > of the worker process continued to increase steadily while the .NET
    > CLR Memory counter '# Bytes in all heaps' remained constant. Pretty
    > much all the documentation that we've read so far states that this
    > points to native memory leak and is not a managed memory leak.
    >
    > So to test this theory further, i created the basic Hello World web
    > svc & monitored the "private bytes" counter in perf mon/
    > ProcessExplorer. The app pool was set to recycle when the "Maximum
    > used memory (in MB)" set to 25. Sure enough, the private bytes used
    > showed a steady increase and caused the app pool to recycle! What
    > exactly is happening/leaking here? We've been struggling for the past
    > 3 days to eliminate unnecessary obj allocations and reached a stage
    > where everything was commented but it still happened. Any ideas?
    >
    > Config:
    > IIS 6.0 running on Windows Server 2003 (SP1).
    > Hello World web svc in .NET 1.1 as well as .NET 2.0 displays the same
    > behavior.
    >
    > Thanks
    > chen
    >
     
    Pramod Anchuparayil, Jun 28, 2007
    #2
    1. Advertising

  3. chen

    Dave Guest

    you may want to install server 2003 sp2, there is at least one fix in there
    about leaks of private memory.

    "chen" <> wrote in message
    news:...
    > While investigating a possible memory leak scenario in one our web
    > services, we ran into a peculiar situation where the "private bytes"
    > of the worker process continued to increase steadily while the .NET
    > CLR Memory counter '# Bytes in all heaps' remained constant. Pretty
    > much all the documentation that we've read so far states that this
    > points to native memory leak and is not a managed memory leak.
    >
    > So to test this theory further, i created the basic Hello World web
    > svc & monitored the "private bytes" counter in perf mon/
    > ProcessExplorer. The app pool was set to recycle when the "Maximum
    > used memory (in MB)" set to 25. Sure enough, the private bytes used
    > showed a steady increase and caused the app pool to recycle! What
    > exactly is happening/leaking here? We've been struggling for the past
    > 3 days to eliminate unnecessary obj allocations and reached a stage
    > where everything was commented but it still happened. Any ideas?
    >
    > Config:
    > IIS 6.0 running on Windows Server 2003 (SP1).
    > Hello World web svc in .NET 1.1 as well as .NET 2.0 displays the same
    > behavior.
    >
    > Thanks
    > chen
    >
     
    Dave, Jun 29, 2007
    #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. Trevor Andrew
    Replies:
    2
    Views:
    508
    S. Justin Gengo
    Jul 24, 2003
  2. Trevor Andrew
    Replies:
    0
    Views:
    469
    Trevor Andrew
    Jul 25, 2003
  3. Henry Chen
    Replies:
    0
    Views:
    432
    Henry Chen
    Jun 10, 2004
  4. mark

    Aspnet worker process recycling

    mark, Jul 9, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    1,968
  5. Ronald

    Memory leak? Private Bytes/Virtual Bytes

    Ronald, Mar 7, 2005, in forum: ASP General
    Replies:
    3
    Views:
    521
    Pat [MSFT]
    Mar 9, 2005
Loading...

Share This Page