Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / April 2005

Tip: Looking for answers? Try searching our database.

OutOfMemoryException is thrown

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Carlos - 26 Apr 2005 14:51 GMT
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
Ben Strackany - 26 Apr 2005 17:12 GMT
Does the machine have a lot of ram (2+ GB)? If so, you may want to enable
the /3gb switch.

Signature

Benjamin Strackany
http://www.developmentnow.com

> I have a process which is running a remoting object.
> This object reads messages from a MSMQ queue. Each message is a dataset
[quoted text clipped - 14 lines]
>
> Carlos
Carlos - 27 Apr 2005 09:00 GMT
It has 2 GB,.. but increasing RAM would  solve the problem ???  I dont think so

"Ben Strackany" escribió:

> Does the machine have a lot of ram (2+ GB)? If so, you may want to enable
> the /3gb switch.
[quoted text clipped - 17 lines]
> >
> > Carlos
Willy Denoyette [MVP] - 30 Apr 2005 18:24 GMT
> I have a process which is running a remoting object.
> This object reads messages from a MSMQ queue. Each message is a dataset
[quoted text clipped - 14 lines]
>
> 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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.