Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

memory leak

Status
Not open for further replies.

dmsruthi

Programmer
Aug 17, 2005
19
US
Hi,
am working on C# Windows application, I call TraceListener.writeline method every 5 milli seconds,

if I start my application its stopping after 6 hours or so, wht I am thinking is , it could be the problem with memory leak, bcos its creating logs with the size of 10 gb.


is there any way to stop that memory leak
 
Have you ever tried opening a 10gb log file? You're computer takes a bathroom break after the first 30 seconds.

Try splitting your log file up into many multiple files. C# can't handle writing to files that big.

Remember, 1 MB = a novel worth of information. You're trying to write to a file that is 10240 novels long every 5 milliseconds.
 
Hello,
Here in my application will write tons of information each time(5 ms), some times it exceed that capacity also(10gb).

Thanks
 
Please consider breaking up your log file into many multiple files. 10GB is too big for a text/log file.

TOO BIG.
 
Like JurkMonkey says.
Your file is too large to be handled easily. Try creating one file per minute or hour, to get the size of each down to a more managable size.

Chip H.


____________________________________________________________________
Donate to Katrina relief:
If you want to get the best response to a question, please read FAQ222-2244 first
 
You may look at using EIF. It writes to a log file (or the application log if needed) on the kernal level so its super fast. It takes some getting used to but can be a light weight way to log lots of information.

For example. in a test I logged 100,000 separated events in 7.8 seconds.

Here is a link to more information.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top