Re: OutOfMemoryException is thrown
- From: "Willy Denoyette [MVP]" <willy.denoyette@xxxxxxxxxx>
- Date: Sat, 30 Apr 2005 19:24:39 +0200
"Carlos" <Carlos@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:36BA829F-C7CB-45DB-9612-5AC307D6DF09@xxxxxxxxxxxxxxxx
>
> I have a process which is running a remoting object.
> This object reads messages from a MSMQ queue. Each message is a dataset
> and it is stored in a Oracle10 Database. (Messages in the queue are stored
> as strings)
> After start, the process uses 30-40MB of memory (in the taskmanager).
> Two or three days later, the memory used by the process is about 550MB and
> then
> an OutOfMemoryException is thrown.
> I've tried with the native Oracle Data PRovider, the .Net Oracle Provider
> and ODBC.
> I also call the GC.Collect() method every hour.
> I'm not using unsafe code.
>
> Any ideas??
>
> thanks in advance...
>
> Carlos
Check with perfmon where the memory goes ;-), the "CLR memory" gen0 .. 2 and
Harge Object Heap counters shows you the managed heap consumption, while
"process" - private bytes tells you about both managed and native heap
consumption (the managed heap itself is a native heap).
If it happens that your gen2 counter grows and doesn't shrink when a full
collection occurs, you have to inspect your code as you are keeping object
references alive (places to look at are arrays, arraylist and collections).
If the LOH grows (containing objects > 85 Kb) it means that - or you are
holding LOH references, or the LOH is getting fragmented, in the latter case
there is only one thing you can do - shutdown the service (or application
domain) and restart.
If your gen 0 ..2 counters show a normal allocation pattern (that is
growing/shrinking), but private bytes keep growing, you have a unmanaged
leak (note that you always call unmanaged code, be indirectly or directly).
Willy.
.
- References:
- OutOfMemoryException is thrown
- From: Carlos
- OutOfMemoryException is thrown
- Prev by Date: Re: ThreadPool - why no SetMaxThreads?
- Next by Date: Re: Windows Control Hosted in IE Problem
- Previous by thread: Re: OutOfMemoryException is thrown
- Next by thread: Image SQL type
- Index(es):
Relevant Pages
|