PC Review


Reply
Thread Tools Rate Thread

Memory Problems

 
 
=?Utf-8?B?SmltIEhlYXZleQ==?=
Guest
Posts: n/a
 
      10th Jun 2005
Hello, I have a fairly simple application which reads none to many input
files and edits them and if they are clean, it writes these transaction to
the database. Any errors it finds, it opens and error file and writes the
error message and the error transaction to this file. After the processing
of the file is complete, it will copy the original file to an archive
directory and then delete the original file.

The problem is that after processing about 25 files, it runs out of memory.
So I must be doing something wrong to cause the memory to continue to climb,
as it seems that it should reach a point where memory usage should level off
as it is doing the same thing over and over.

I am waiting until all the transactions from the file have been processed
until I do a commit (Oracle, not on the local box) which could be a couple of
thousand transactions, but I have been told that this should not have an
impact on my performance or memory use.

So how does one go about finding out why their memory usage continues to
climb?

Thanks in advance for your assistance!
 
Reply With Quote
 
 
 
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      10th Jun 2005
Jim,

Without seeing your code, it's hard to say. Are you getting this
through just looking at Task Manager? Task Manager is not a good indication
of whether or not you are actually running out of memory or consuming too
much or whether there is a leak.

As a general guideline, you should make sure that you are disposing of
any instances that implement IDisposable. Also, are you loading all of your
data in extra large chunks (for example, loading large files into a byte
array before processing them)? If so, you might want to consider processing
a segment at a time (reading from a stream, for example).

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)

"Jim Heavey" <(E-Mail Removed)> wrote in message
news:09AED9D7-3BE1-483E-89A2-(E-Mail Removed)...
> Hello, I have a fairly simple application which reads none to many input
> files and edits them and if they are clean, it writes these transaction to
> the database. Any errors it finds, it opens and error file and writes the
> error message and the error transaction to this file. After the
> processing
> of the file is complete, it will copy the original file to an archive
> directory and then delete the original file.
>
> The problem is that after processing about 25 files, it runs out of
> memory.
> So I must be doing something wrong to cause the memory to continue to
> climb,
> as it seems that it should reach a point where memory usage should level
> off
> as it is doing the same thing over and over.
>
> I am waiting until all the transactions from the file have been processed
> until I do a commit (Oracle, not on the local box) which could be a couple
> of
> thousand transactions, but I have been told that this should not have an
> impact on my performance or memory use.
>
> So how does one go about finding out why their memory usage continues to
> climb?
>
> Thanks in advance for your assistance!



 
Reply With Quote
 
 
 
 
Bhargavan
Guest
Posts: n/a
 
      10th Jun 2005
Hey Jim,
There is a tool called Memory Profiler available on the
internet(http://www.scitech.se/memprofiler/). Try to get that and see how
your application performs. It will list all details about the unreleased
memory by each control/component in your application. That will give you a
better idea about any memory leaks in your application. Hope this would help
you.
Bhargavan M.

"Jim Heavey" <(E-Mail Removed)> wrote in message
news:09AED9D7-3BE1-483E-89A2-(E-Mail Removed)...
> Hello, I have a fairly simple application which reads none to many input
> files and edits them and if they are clean, it writes these transaction to
> the database. Any errors it finds, it opens and error file and writes the
> error message and the error transaction to this file. After the
> processing
> of the file is complete, it will copy the original file to an archive
> directory and then delete the original file.
>
> The problem is that after processing about 25 files, it runs out of
> memory.
> So I must be doing something wrong to cause the memory to continue to
> climb,
> as it seems that it should reach a point where memory usage should level
> off
> as it is doing the same thing over and over.
>
> I am waiting until all the transactions from the file have been processed
> until I do a commit (Oracle, not on the local box) which could be a couple
> of
> thousand transactions, but I have been told that this should not have an
> impact on my performance or memory use.
>
> So how does one go about finding out why their memory usage continues to
> climb?
>
> Thanks in advance for your assistance!



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
My available memory is down to very little, yet my PF Usage is 8 gigabytes (about how much memory is on the box), sql server keeps having memory issues yet the sqlservr.exe is using hardly any memory.. how to fix this? is there some way to limit how Daniel Microsoft Windows 2000 Security 1 30th Aug 2007 07:38 AM
My available memory is down to very little, yet my PF Usage is 8 gigabytes (about how much memory is on the box), sql server keeps having memory issues yet the sqlservr.exe is using hardly any memory.. how to fix this? is there some way to limit how Daniel Microsoft Windows 2000 1 30th Aug 2007 01:22 AM
My available memory is down to very little, yet my PF Usage is 8 gigabytes (about how much memory is on the box), sql server keeps having memory issues yet the sqlservr.exe is using hardly any memory.. how to fix this? is there some way to limit how Daniel Microsoft Windows 2000 Networking 0 28th Aug 2007 12:38 AM
My available memory is down to very little, yet my PF Usage is 8 gigabytes (about how much memory is on the box), sql server keeps having memory issues yet the sqlservr.exe is using hardly any memory.. how to fix this? is there some way to limit how Daniel Microsoft Windows 2000 Advanced Server 0 28th Aug 2007 12:38 AM
Memory Management, Free Memory, Available Memory =?Utf-8?B?RkI=?= Microsoft Windows 2000 1 11th May 2005 07:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:59 AM.