Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Native Memory leak? (Private bytes increases resulting in worker process recycling)

Reply
Thread Tools

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

 
 
chen
Guest
Posts: n/a
 
      06-28-2007
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

 
Reply With Quote
 
 
 
 
Pramod Anchuparayil
Guest
Posts: n/a
 
      06-28-2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> 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
>


 
Reply With Quote
 
 
 
 
Dave
Guest
Posts: n/a
 
      06-29-2007
you may want to install server 2003 sp2, there is at least one fix in there
about leaks of private memory.

"chen" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> 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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
An int that is 4 bytes in native, and 12 bytes in .NET? Huh? BogusException C++ 7 02-06-2007 04:47 AM
How to get process id of hosting ASP.NET worker process ? Navin Mishra ASP .Net Web Services 0 02-07-2006 08:40 PM
Memory leak? Private Bytes/Virtual Bytes Ronald ASP General 3 03-09-2005 07:55 PM
I can map all files (.*) to asp.net worker.How do I map NO FILE to asp.net worker? alex ASP .Net 1 02-04-2005 03:18 AM
Use of Proactive Process Recycling for worker process Henry Chen ASP .Net 0 06-10-2004 05:56 AM



Advertisments