Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Reason for such a werid error??  RSS feed

 
Chhaya Dhanani
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friendezzz,
i am running an application on sun solaris using tomcat which is based on the MVC architecture.
Yesterday, it encountered an java.lang.OutOfMemoryError, which i couldnot trace..
it showed something like this..
2002-05-07 14:18:36 - DecodeInterceptor: Charset from session ISO-8859-1
ThreadPool: Caught exception executing org.apache.tomcat.util.net.TcpWorkerThread@ce93ef, terminating thread java.lang.OutOfMemoryError
Please can anyone help on this.? under what circumstances would this happen and how to avoid this memory leak (if it actually is memory leak!! ) problem...
Thanx in advance..
Chhaya
2002-05-07 14:18:36 - DecodeInterceptor: Charset from session ISO-8859-1
 
Chhaya Dhanani
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
Can no one answer that query of mine..
not even the moderators or bartenders...
Chhaya
 
Juanjo Bazan
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you use Connection objects?
If so, make sure that the Connections used in the application is properly returned to the pool after use and is killed when the load on the server goes less.
This will give an optimum performance and reduce the memory being eaten up by the server.
 
Anthony Villanueva
Ranch Hand
Posts: 1055
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your servlets or JSP pages have any problems and you see "java.lang.OutOfMemoryError" in your log files or in a stack trace generated by the Java Virtual Machine (JVM), then you probably need to increase the JVM's maximum heap size.
Each instance of a Java Virtual Machine uses an allocation of memory for all objects, shared among all its threads, called the heap. The default size and some of the features of the heap's behavior are implementation dependent, but most (if not all) implementations allow you to modify the heap's minimum and maximum size, and most provide a default value for these settings.
What setting you choose should be determined by testing and trial and error. It is highly application and load dependent.
You should not try to catch OutOfMemoryErrors in your application. They are not generally predictable. And when they do happen, there's nothing to be done to recover, because by then the JVM is out of memory and the garbage collector is unable to free any memory for further work.
 
Jim Baiter
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you really can't resolve this any other way you should consider using a profiler such as JProbe. This will tell you which objects are consuming the memory.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!