Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.util.logger OutOfMemoryError

 
Wesley Baker
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some of my programs that write to a log file will get OutOfMemoryErrors if the log file becomes too big. This seems odd to me, since I assume (ass=u+me) that the java.util.logger does not attempt to keep all previous log entries in memory for the duration fo the JVM, or until the logger is garbage collected. Is this not true? I am using J2SE 1.6.

I can post some code if needed, but I figured this was more of a "why does Java do this" question.
 
Kees Jan Koster
JavaMonitor Support
Rancher
Posts: 251
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Wesley,

Not sure if you are right, but if you post a stack trace, perhaps we can help out.

Most likely, your app is eating all the memory and java.util.Logging is just an innocent bystander.

Kees Jan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic