Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The following page has been changed by GianlucaVarisco:
http://wiki.apache.org/tomcat/FAQ/Bugs/Memory

------------------------------------------------------------------------------
  
  First look at {{{java -X}}} to determine what parameters to set. Then you can 
set them via the environment variable {{{JAVA_OPTS}}}. Read the files 
catalina.bat or catalina.sh for more information on JAVA_OPTS.
  
- '''Why do I get OutOfMemoryError errors?'''
+ '''Why do I get {{{OutOfMemoryError}}} errors?'''
  
  Many reasons.
  
   * You're out of memory. Simple as that - add more to your heap.
   * You're out of memory. You have code which is hanging onto object 
references and the garbage collector can't do its job. Get a profiler to debug 
this one.
-  * You ran out of file descriptors. If you are on a *nix system, it has been 
observed that an OutOfMemoryError can be thrown if you run out of file 
descriptors. This can occur if your threshold is too low. The {{{ulimit}}} 
program can help you out here. You also may need to account for socket 
connections too when thinking about these thresholds. Google is your friend for 
getting more information about this topic.
+  * You ran out of file descriptors. If you are on a *nix system, it has been 
observed that an {{{OutOfMemoryError}}} can be thrown if you run out of file 
descriptors. This can occur if your threshold is too low. The {{{ulimit}}} 
program can help you out here. You also may need to account for socket 
connections too when thinking about these thresholds. Google is your friend for 
getting more information about this topic.
   * You have too many threads running. Some OS's have a limit to the number of 
threads which may be executed by a single process. (Which is what the JVM is.) 
Refer to your OS docs for more information on how to raise this threshold.
   * If you have a lot of servlets or JSP's, you may need to increase your 
permanent generation. By default, it is 64MB. Doubling it to be 
{{{-XX:MaxPermSize=256m}}} might be a good start.
   * Your OS limits the amount of memory your process may take. OK, this one is 
grasping at straws.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to