.net windows service using alot of Paged pool

R

RF

Hi

We have a windows service implemented in C# that will call some legacy VB6
COM objects. This is a memory intensive application that will create alot of
objects but looking at the memory and virtual memory footprint it will remain
under the 70meg level. On the other hand the Paged pool will keep going up
and up. What would be the cause of this?
 
J

Jeroen Mostert

RF said:
We have a windows service implemented in C# that will call some legacy VB6
COM objects. This is a memory intensive application that will create alot of
objects but looking at the memory and virtual memory footprint it will remain
under the 70meg level. On the other hand the Paged pool will keep going up
and up. What would be the cause of this?

Here's an excellent post on that, including instructions on how to diagnose it:

http://blogs.msdn.com/ntdebugging/a...umption-and-Event-ID_3A00_--2020-or-2019.aspx

The most likely suspect is a handle leak. The stable way of solving that is
to find the leak and make sure all objects are properly released, but if the
leak is in the VB6 code you may be out of luck, and a periodic restart would
be the only way of "fixing" things.

In the .NET code, make sure you properly .Dispose() objects that implement
IDisposable, and use safe handles for unmanaged resources (see
http://msdn2.microsoft.com/en-us/library/fh21e17c.aspx). If the issue is
that COM objects are being kept alive when they shouldn't, check if you're
keeping references to them that prevent garbage collection. You can also try
explicitly releasing the objects through Marshal.ReleaseComObject(),
although this should be necessary only if objects need to be freed in a
specific order.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top