[quoted text, click to view] <neal.m.shah@gmail.com> wrote in message
news:1136560410.657430.253860@g43g2000cwa.googlegroups.com...
| All,
|
| I've written a Windows Service that polls our database server every 10
| seconds or so. It's running on multiple boxes and basically checks the
| database to see if that particular machine needs to perform a specific
| task.
|
| The application was written in .NET 1.1 and C#. The servers we are
| running the application on are all Windows Server 2003 SP1.
|
| Anyway, every few days or so, this application starts eating up paged
| and non-paged memory until the memory is taken, and needs to be
| rebooted.
|
| I originally suspected my data access code wasn't releasing the memory
| properly and recoded my application to use a using statement and
| explicitly close the data connection. But I'm still receiving the
| paged and non-paged memory error.
|
| Has anybody experienced this issue before? Is this a known bug? I was
| always under the assumption that all managed code had automatic garbage
| collection and I wouldn't have this issue with memory leaks.
|
| If anybody has any idea on why I'm getting this error, please let me
| know. I really appreciate you taking your time to help me out.
|
| Thanks in Advance,
| Neal
The GC doesn't collect unmanaged memory or unmanaged handles, that's still
your code's responsability (through Dispose).
I'm also not clear on how you get paged pool and unpaged pool statistics,
are you running a particular tool to watch your memory consumption?
Anyway you should run a memory profiler to watch your managed/unmanaged
memory consumption, the CLRprofiler is freely downloadable from :
http://www.microsoft.com/downloads/details.aspx?FamilyId=A362781C-3870-43BE-8926-862B40AA0CD0&displaylang=en isn't that bad, others like Scitec (
http://memprofiler.com/) have some more
options and have trial versions available for download.
Willy.