OutOfMemoryException is thrown

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Does the machine have a lot of ram (2+ GB)? If so, you may want to enable
the /3gb switch.
 
It has 2 GB,.. but increasing RAM would solve the problem ??? I dont think so

"Ben Strackany" escribió:
 
Carlos said:
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.
 
Back
Top