funkman 2004/12/12 15:02:41
Modified: xdocs-faq memory.xml
docs/faq memory.html
docs/faq/printer memory.html
Log:
Add tidbit about MaxPermSize
Revision Changes Path
1.5 +6 -1 jakarta-tomcat-site/xdocs-faq/memory.xml
Index: memory.xml
===================================================================
RCS file: /home/cvs/jakarta-tomcat-site/xdocs-faq/memory.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- memory.xml 19 Dec 2003 17:23:59 -0000 1.4
+++ memory.xml 12 Dec 2004 23:02:41 -0000 1.5
@@ -69,7 +69,7 @@
You may wish to tune the JSP compiler configuration to prevent
memory leaks. Of course, these are documents you should have
read by now anyways..
- </p>
+ </p>
</subsection>
</section>
@@ -127,6 +127,11 @@
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.
+ </li>
+ <li>
+ 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 <code>-XX:MaxPermSize=256m</code> might be a good
start.
</li>
<li>Your OS limits the amount of memory your process may take. OK, this
one is grasping at straws.
1.11 +163 -158 jakarta-tomcat-site/docs/faq/memory.html
Index: memory.html
===================================================================
RCS file: /home/cvs/jakarta-tomcat-site/docs/faq/memory.html,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- memory.html 10 Nov 2004 17:52:15 -0000 1.10
+++ memory.html 12 Dec 2004 23:02:41 -0000 1.11
@@ -1,159 +1,164 @@
-<html><head><META http-equiv="Content-Type" content="text/html;
charset=iso-8859-1"><title>Tomcat FAQ - Memory</title><meta value="Tim Funk"
name="author"><meta value="[EMAIL PROTECTED]" name="email"><style>
- dt { font-size : larger; font-weight : bold }
- dd {padding-bottom : 10px;}
- </style></head><body vlink="#525D76" alink="#525D76" link="#525D76"
text="#000000" bgcolor="#ffffff"><table cellspacing="4" width="100%"
border="0"><!--PAGE HEADER--><tr><td colspan="2"><!--JAKARTA LOGO--><a
href="http://jakarta.apache.org/"><img border="0" alt="The Jakarta Project"
align="left"
src="http://jakarta.apache.org//images/jakarta-logo.gif"></a><!--PROJECT
LOGO--><a href="http://jakarta.apache.org/tomcat/"><img border="0" alt="
- Tomcat FAQ
- " align="right" src="../images/tomcat.gif"></a></td></tr><!--HEADER
SEPARATOR--><tr><td colspan="2"><hr size="1" noshade=""></td></tr><tr><!--LEFT
SIDE NAVIGATION--><td nowrap="true" valign="top"
width="20%"><p><strong>Links</strong></p><ul><li><a href="..">Tomcat
Home</a></li><li><a href="index.html">FAQ
Home</a></li></ul><p><strong>Contents</strong></p><ul><li><a
href="bugs.html">Bugs</a></li><li><a href="classnotfound.html">Class Not
Found</a></li><li><a href="connectors.html">Connectors</a></li><li><a
href="database.html">Database</a></li><li><a
href="deployment.html">Deployment</a></li><li><a href="fda-validation.html">FDA
Validation</a></li><li><a
href="http://wiki.apache.org/jakarta-tomcat/HowTo">How do I</a></li><li><a
href="unix.html">Linux / Unix</a></li><li><a
href="otherOperatingSystems.html">Other Operating Systems</a></li><li><a
href="logging.html">Logging</a></li><li><a
href="memory.html">Memory</a></li><li><a href="meta.html">Meta</a></li><li><a
href="misc.html">Miscellaneous</a></li><li><a
href="performance.html">Monitoring / Performance</a></li><li><a
href="http://wiki.apache.org/jakarta-tomcat/UsefulLinks">Other
Resources</a></li><li><a href="security.html">Security</a></li><li><a
href="version.html">Which Version</a></li><li><a href="tomcatuser.html">Tomcat
User List</a></li><li><a
href="http://wiki.apache.org/jakarta-tomcat/">Wiki</a></li><li><a
href="windows.html">Windows</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td
align="left" valign="top" width="80%"><table cellspacing="4" width="100%"
border="0"><tr><td nowrap="true" valign="top" align="left"><h1>Tomcat
FAQ</h1><h2>Memory</h2></td><td nowrap="true" valign="top"
align="right"><small><a href="printer/memory.html"><img alt="Printer Friendly
Version" border="0" src="../images/printer.gif"><br>print-friendly<br>version
- </a></small></td></tr></table><table cellpadding="2"
cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font
face="arial,helvetica.sanserif" color="#ffffff"><a
name="Preface"><strong>Preface</strong></a></font></td></tr><tr><td><blockquote>
- <p>
- This page discusses various memory issues. In a nutshell - if your
- computer has less than 128MB of ram - you will probably have trouble.
- Anyhow, also read the following threads for other memory related issues:
- <ul>
- <li>
- <a href="http://marc.theaimsgroup.com/?t=104388973000006&r=1&w=2">
- java.lang.OutOfMemoryError during deploy
- </a>
- </li>
-
- <li>
- <a href="http://marc.theaimsgroup.com/?t=104378347700007&r=1&w=2">
- Memory requirements
- </a>
- </li>
-
- <li>
- <a href="http://marc.theaimsgroup.com/?t=104333066400004&r=1&w=2">
- Memory Mgmt Tomcat
- </a>
- </li>
-
- <li>
- <a href="http://marc.theaimsgroup.com/?t=103011379700006&r=1&w=2">
- Tomcat Out of memory
- </a>
- </li>
-
- <li>
- <a href="http://marc.theaimsgroup.com/?t=104519961700002&r=1&w=2">
- Tracking memory usage over time
- </a>
- </li>
-
- </ul>
-</p>
-<p>
- Also look at
- <a href="http://java.quest.com/jprobe/jprobe.shtml">JProbe</a>,
- or <a href="http://www.borland.com/optimizeit/">OptimizeIt</a>, or other
- profiling tools. Lots of people recommend these tools.
- This is not an endorsement for them, I just
- notice other people like them.
-</p>
-
- <table cellpadding="2" cellspacing="0" border="0"><tr><td
bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a
name="JSP Recompilation"><strong>JSP
Recompilation</strong></a></font></td></tr><tr><td><blockquote>
- <p>
- If your application uses JSPs which are frequently recompiled
- at runtime, e.g. headers that change value hourly, please make
- sure to read the JSP HOW-TO page and RELEASE NOTES documents.
- You may wish to tune the JSP compiler configuration to prevent
- memory leaks. Of course, these are documents you should have
- read by now anyways..
- </p>
- </blockquote></td></tr></table>
-
-</blockquote></td></tr></table><table cellpadding="2" cellspacing="0"
border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif"
color="#ffffff"><a
name="Questions"><strong>Questions</strong></a></font></td></tr><tr><td><blockquote>
-<p>
- <ul>
- <li><a href="#adjust"> How do I adjust memory settings?</a></li>
- <li><a href="#why"> Why do I get OutOfMemoryError errors?</a></li>
- <li><a href="#howmuch"> How much memory is tomcat/webapp/???
using?</a></li>
- </ul>
-</p>
-</blockquote></td></tr></table><table cellpadding="2" cellspacing="0"
border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif"
color="#ffffff"><a
name="Answers"><strong>Answers</strong></a></font></td></tr><tr><td><blockquote>
-
- <b style="font-size: larger">
- <a name="adjust">
- How do I adjust memory settings?
- </a>
- </b>
- <div style="padding-left : 20px;">
- First look at <code>java -X</code> to determine what parameters to set.
- Then you can set them via the environment variable
<code>JAVA_OPTS</code>.
- Read the files catalina.bat or catalina.sh for
- more information on JAVA_OPTS.
- </div><br>
-
-
- <b style="font-size: larger">
- <a name="why">
- Why do I get OutOfMemoryError errors?
- </a>
- </b>
- <div style="padding-left : 20px;">
- Many reasons.
- <ul>
- <li>
- You're out of memory. Simple as that - add more to your heap.
- </li>
- <li>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.
- </li>
- <li>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 <code>ulimit</code> 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.
- </li>
- <li>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.
- </li>
- <li>Your OS limits the amount of memory your process may take. OK, this
- one is grasping at straws.
- </li>
- <li> The JVM has a bug. This has been known to happen with JVM1.2.?
and using
- EJB's with another servlet engine.
- </li>
- <li> Not actually a reason - but on your particular platform, look at
the
- <code>java -X</code> options. They may be VERY helpful.
- </li>
- </ul>
- </div><br>
-
- <b style="font-size: larger">
- <a name="howmuch">
- How much memory is Tomcat/webapp/??? using?
- </a>
- </b>
- <div style="padding-left : 20px;">
- <ul>
- <li>
- To find out how much memory Tomcat is using, you might be able to
- use the <code>Runtime</code> class provided by the JDK.
- </li>
- <li>
- You can't find out how much memory a webapp is using. The JVM
- doesn't give us these detail.
- </li>
- <li>
- You can't find out how much memory a <i>???</i> is using. The JVM
- doesn't give us these detail.
- </li>
- <li>
- That being said, a memory profiling tool might prove the above
- statements wrong - but you probably don't want to use them
- in a production environment.
- </li>
- </ul>
- </div><br>
-
-
-</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td
colspan="2"><hr size="1" noshade=""></td></tr><!--PAGE FOOTER--><tr><td
colspan="2"><div align="center"><font size="-1" color="#525D76"><em>
- Copyright © 1999-2003, Apache Software Foundation
+<html><head><META http-equiv="Content-Type" content="text/html;
charset=iso-8859-1"><title>Tomcat FAQ - Memory</title><meta value="Tim Funk"
name="author"><meta value="[EMAIL PROTECTED]" name="email"><style>
+ dt { font-size : larger; font-weight : bold }
+ dd {padding-bottom : 10px;}
+ </style></head><body vlink="#525D76" alink="#525D76" link="#525D76"
text="#000000" bgcolor="#ffffff"><table cellspacing="4" width="100%"
border="0"><!--PAGE HEADER--><tr><td colspan="2"><!--JAKARTA LOGO--><a
href="http://jakarta.apache.org/"><img border="0" alt="The Jakarta Project"
align="left"
src="http://jakarta.apache.org//images/jakarta-logo.gif"></a><!--PROJECT
LOGO--><a href="http://jakarta.apache.org/tomcat/"><img border="0" alt="
+ Tomcat FAQ
+ " align="right" src="../images/tomcat.gif"></a></td></tr><!--HEADER
SEPARATOR--><tr><td colspan="2"><hr size="1" noshade=""></td></tr><tr><!--LEFT
SIDE NAVIGATION--><td nowrap="true" valign="top"
width="20%"><p><strong>Links</strong></p><ul><li><a href="..">Tomcat
Home</a></li><li><a href="index.html">FAQ
Home</a></li></ul><p><strong>Contents</strong></p><ul><li><a
href="bugs.html">Bugs</a></li><li><a href="classnotfound.html">Class Not
Found</a></li><li><a href="connectors.html">Connectors</a></li><li><a
href="database.html">Database</a></li><li><a
href="deployment.html">Deployment</a></li><li><a href="fda-validation.html">FDA
Validation</a></li><li><a
href="http://wiki.apache.org/jakarta-tomcat/HowTo">How do I</a></li><li><a
href="unix.html">Linux / Unix</a></li><li><a
href="otherOperatingSystems.html">Other Operating Systems</a></li><li><a
href="logging.html">Logging</a></li><li><a
href="memory.html">Memory</a></li><li><a href="meta.html">Meta</a></li><li><a
href="misc.html">Miscellaneous</a></li><li><a
href="performance.html">Monitoring / Performance</a></li><li><a
href="http://wiki.apache.org/jakarta-tomcat/UsefulLinks">Other
Resources</a></li><li><a href="security.html">Security</a></li><li><a
href="version.html">Which Version</a></li><li><a href="tomcatuser.html">Tomcat
User List</a></li><li><a
href="http://wiki.apache.org/jakarta-tomcat/">Wiki</a></li><li><a
href="windows.html">Windows</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td
align="left" valign="top" width="80%"><table cellspacing="4" width="100%"
border="0"><tr><td nowrap="true" valign="top" align="left"><h1>Tomcat
FAQ</h1><h2>Memory</h2></td><td nowrap="true" valign="top"
align="right"><small><a href="printer/memory.html"><img alt="Printer Friendly
Version" border="0" src="../images/printer.gif"><br>print-friendly<br>version
+ </a></small></td></tr></table><table cellpadding="2"
cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font
face="arial,helvetica.sanserif" color="#ffffff"><a
name="Preface"><strong>Preface</strong></a></font></td></tr><tr><td><blockquote>
+ <p>
+ This page discusses various memory issues. In a nutshell - if your
+ computer has less than 128MB of ram - you will probably have trouble.
+ Anyhow, also read the following threads for other memory related issues:
+ <ul>
+ <li>
+ <a href="http://marc.theaimsgroup.com/?t=104388973000006&r=1&w=2">
+ java.lang.OutOfMemoryError during deploy
+ </a>
+ </li>
+
+ <li>
+ <a href="http://marc.theaimsgroup.com/?t=104378347700007&r=1&w=2">
+ Memory requirements
+ </a>
+ </li>
+
+ <li>
+ <a href="http://marc.theaimsgroup.com/?t=104333066400004&r=1&w=2">
+ Memory Mgmt Tomcat
+ </a>
+ </li>
+
+ <li>
+ <a href="http://marc.theaimsgroup.com/?t=103011379700006&r=1&w=2">
+ Tomcat Out of memory
+ </a>
+ </li>
+
+ <li>
+ <a href="http://marc.theaimsgroup.com/?t=104519961700002&r=1&w=2">
+ Tracking memory usage over time
+ </a>
+ </li>
+
+ </ul>
+</p>
+<p>
+ Also look at
+ <a href="http://java.quest.com/jprobe/jprobe.shtml">JProbe</a>,
+ or <a href="http://www.borland.com/optimizeit/">OptimizeIt</a>, or other
+ profiling tools. Lots of people recommend these tools.
+ This is not an endorsement for them, I just
+ notice other people like them.
+</p>
+
+ <table cellpadding="2" cellspacing="0" border="0"><tr><td
bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a
name="JSP Recompilation"><strong>JSP
Recompilation</strong></a></font></td></tr><tr><td><blockquote>
+ <p>
+ If your application uses JSPs which are frequently recompiled
+ at runtime, e.g. headers that change value hourly, please make
+ sure to read the JSP HOW-TO page and RELEASE NOTES documents.
+ You may wish to tune the JSP compiler configuration to prevent
+ memory leaks. Of course, these are documents you should have
+ read by now anyways..
+ </p>
+ </blockquote></td></tr></table>
+
+</blockquote></td></tr></table><table cellpadding="2" cellspacing="0"
border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif"
color="#ffffff"><a
name="Questions"><strong>Questions</strong></a></font></td></tr><tr><td><blockquote>
+<p>
+ <ul>
+ <li><a href="#adjust"> How do I adjust memory settings?</a></li>
+ <li><a href="#why"> Why do I get OutOfMemoryError errors?</a></li>
+ <li><a href="#howmuch"> How much memory is tomcat/webapp/???
using?</a></li>
+ </ul>
+</p>
+</blockquote></td></tr></table><table cellpadding="2" cellspacing="0"
border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif"
color="#ffffff"><a
name="Answers"><strong>Answers</strong></a></font></td></tr><tr><td><blockquote>
+
+ <b style="font-size: larger">
+ <a name="adjust">
+ How do I adjust memory settings?
+ </a>
+ </b>
+ <div style="padding-left : 20px;">
+ First look at <code>java -X</code> to determine what parameters to set.
+ Then you can set them via the environment variable
<code>JAVA_OPTS</code>.
+ Read the files catalina.bat or catalina.sh for
+ more information on JAVA_OPTS.
+ </div><br>
+
+
+ <b style="font-size: larger">
+ <a name="why">
+ Why do I get OutOfMemoryError errors?
+ </a>
+ </b>
+ <div style="padding-left : 20px;">
+ Many reasons.
+ <ul>
+ <li>
+ You're out of memory. Simple as that - add more to your heap.
+ </li>
+ <li>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.
+ </li>
+ <li>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 <code>ulimit</code> 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.
+ </li>
+ <li>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.
+ </li>
+ <li>
+ 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 <code>-XX:MaxPermSize=256m</code> might be a good
start.
+ </li>
+ <li>Your OS limits the amount of memory your process may take. OK, this
+ one is grasping at straws.
+ </li>
+ <li> The JVM has a bug. This has been known to happen with JVM1.2.?
and using
+ EJB's with another servlet engine.
+ </li>
+ <li> Not actually a reason - but on your particular platform, look at
the
+ <code>java -X</code> options. They may be VERY helpful.
+ </li>
+ </ul>
+ </div><br>
+
+ <b style="font-size: larger">
+ <a name="howmuch">
+ How much memory is Tomcat/webapp/??? using?
+ </a>
+ </b>
+ <div style="padding-left : 20px;">
+ <ul>
+ <li>
+ To find out how much memory Tomcat is using, you might be able to
+ use the <code>Runtime</code> class provided by the JDK.
+ </li>
+ <li>
+ You can't find out how much memory a webapp is using. The JVM
+ doesn't give us these detail.
+ </li>
+ <li>
+ You can't find out how much memory a <i>???</i> is using. The JVM
+ doesn't give us these detail.
+ </li>
+ <li>
+ That being said, a memory profiling tool might prove the above
+ statements wrong - but you probably don't want to use them
+ in a production environment.
+ </li>
+ </ul>
+ </div><br>
+
+
+</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td
colspan="2"><hr size="1" noshade=""></td></tr><!--PAGE FOOTER--><tr><td
colspan="2"><div align="center"><font size="-1" color="#525D76"><em>
+ Copyright © 1999-2003, Apache Software Foundation
</em></font></div></td></tr></table></body></html>
1.7 +162 -157 jakarta-tomcat-site/docs/faq/printer/memory.html
Index: memory.html
===================================================================
RCS file: /home/cvs/jakarta-tomcat-site/docs/faq/printer/memory.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- memory.html 10 Nov 2004 17:52:17 -0000 1.6
+++ memory.html 12 Dec 2004 23:02:41 -0000 1.7
@@ -1,158 +1,163 @@
-<html><head><META http-equiv="Content-Type" content="text/html;
charset=iso-8859-1"><title>Tomcat FAQ - Memory</title><meta value="Tim Funk"
name="author"><meta value="[EMAIL PROTECTED]" name="email"><style>
- dt { font-size : larger; font-weight : bold }
- dd {padding-bottom : 10px;}
- </style></head><body vlink="#525D76" alink="#525D76" link="#525D76"
text="#000000" bgcolor="#ffffff"><table cellspacing="4" width="100%"
border="0"><!--PAGE HEADER--><tr><td colspan="2"><!--JAKARTA LOGO--><a
href="http://jakarta.apache.org/"><img border="0" alt="The Jakarta Project"
align="left"
src="http://jakarta.apache.org//images/jakarta-logo.gif"></a><!--PROJECT
LOGO--><a href="http://jakarta.apache.org/tomcat/"><img border="0" alt="
- Tomcat FAQ
- " align="right" src="../../images/tomcat.gif"></a></td></tr><!--HEADER
SEPARATOR--><tr><td colspan="2"><hr size="1" noshade=""></td></tr><tr><!--RIGHT
SIDE MAIN BODY--><td align="left" valign="top" width="80%"><table
cellspacing="4" width="100%" border="0"><tr><td nowrap="true" valign="top"
align="left"><h1>Tomcat FAQ</h1><h2>Memory</h2></td><td nowrap="true"
valign="top" align="right"><img border="0" hspace="0" vspace="0" height="1"
width="1" src="../../images/void.gif"></td></tr></table><table cellpadding="2"
cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font
face="arial,helvetica.sanserif" color="#ffffff"><a
name="Preface"><strong>Preface</strong></a></font></td></tr><tr><td><blockquote>
- <p>
- This page discusses various memory issues. In a nutshell - if your
- computer has less than 128MB of ram - you will probably have trouble.
- Anyhow, also read the following threads for other memory related issues:
- <ul>
- <li>
- <a href="http://marc.theaimsgroup.com/?t=104388973000006&r=1&w=2">
- java.lang.OutOfMemoryError during deploy
- </a>
- </li>
-
- <li>
- <a href="http://marc.theaimsgroup.com/?t=104378347700007&r=1&w=2">
- Memory requirements
- </a>
- </li>
-
- <li>
- <a href="http://marc.theaimsgroup.com/?t=104333066400004&r=1&w=2">
- Memory Mgmt Tomcat
- </a>
- </li>
-
- <li>
- <a href="http://marc.theaimsgroup.com/?t=103011379700006&r=1&w=2">
- Tomcat Out of memory
- </a>
- </li>
-
- <li>
- <a href="http://marc.theaimsgroup.com/?t=104519961700002&r=1&w=2">
- Tracking memory usage over time
- </a>
- </li>
-
- </ul>
-</p>
-<p>
- Also look at
- <a href="http://java.quest.com/jprobe/jprobe.shtml">JProbe</a>,
- or <a href="http://www.borland.com/optimizeit/">OptimizeIt</a>, or other
- profiling tools. Lots of people recommend these tools.
- This is not an endorsement for them, I just
- notice other people like them.
-</p>
-
- <table cellpadding="2" cellspacing="0" border="0"><tr><td
bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a
name="JSP Recompilation"><strong>JSP
Recompilation</strong></a></font></td></tr><tr><td><blockquote>
- <p>
- If your application uses JSPs which are frequently recompiled
- at runtime, e.g. headers that change value hourly, please make
- sure to read the JSP HOW-TO page and RELEASE NOTES documents.
- You may wish to tune the JSP compiler configuration to prevent
- memory leaks. Of course, these are documents you should have
- read by now anyways..
- </p>
- </blockquote></td></tr></table>
-
-</blockquote></td></tr></table><table cellpadding="2" cellspacing="0"
border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif"
color="#ffffff"><a
name="Questions"><strong>Questions</strong></a></font></td></tr><tr><td><blockquote>
-<p>
- <ul>
- <li><a href="#adjust"> How do I adjust memory settings?</a></li>
- <li><a href="#why"> Why do I get OutOfMemoryError errors?</a></li>
- <li><a href="#howmuch"> How much memory is tomcat/webapp/???
using?</a></li>
- </ul>
-</p>
-</blockquote></td></tr></table><table cellpadding="2" cellspacing="0"
border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif"
color="#ffffff"><a
name="Answers"><strong>Answers</strong></a></font></td></tr><tr><td><blockquote>
-
- <b style="font-size: larger">
- <a name="adjust">
- How do I adjust memory settings?
- </a>
- </b>
- <div style="padding-left : 20px;">
- First look at <code>java -X</code> to determine what parameters to set.
- Then you can set them via the environment variable
<code>JAVA_OPTS</code>.
- Read the files catalina.bat or catalina.sh for
- more information on JAVA_OPTS.
- </div><br>
-
-
- <b style="font-size: larger">
- <a name="why">
- Why do I get OutOfMemoryError errors?
- </a>
- </b>
- <div style="padding-left : 20px;">
- Many reasons.
- <ul>
- <li>
- You're out of memory. Simple as that - add more to your heap.
- </li>
- <li>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.
- </li>
- <li>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 <code>ulimit</code> 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.
- </li>
- <li>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.
- </li>
- <li>Your OS limits the amount of memory your process may take. OK, this
- one is grasping at straws.
- </li>
- <li> The JVM has a bug. This has been known to happen with JVM1.2.?
and using
- EJB's with another servlet engine.
- </li>
- <li> Not actually a reason - but on your particular platform, look at
the
- <code>java -X</code> options. They may be VERY helpful.
- </li>
- </ul>
- </div><br>
-
- <b style="font-size: larger">
- <a name="howmuch">
- How much memory is Tomcat/webapp/??? using?
- </a>
- </b>
- <div style="padding-left : 20px;">
- <ul>
- <li>
- To find out how much memory Tomcat is using, you might be able to
- use the <code>Runtime</code> class provided by the JDK.
- </li>
- <li>
- You can't find out how much memory a webapp is using. The JVM
- doesn't give us these detail.
- </li>
- <li>
- You can't find out how much memory a <i>???</i> is using. The JVM
- doesn't give us these detail.
- </li>
- <li>
- That being said, a memory profiling tool might prove the above
- statements wrong - but you probably don't want to use them
- in a production environment.
- </li>
- </ul>
- </div><br>
-
-
-</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td
colspan="2"><hr size="1" noshade=""></td></tr><!--PAGE FOOTER--><tr><td
colspan="2"><div align="center"><font size="-1" color="#525D76"><em>
- Copyright © 1999-2003, Apache Software Foundation
+<html><head><META http-equiv="Content-Type" content="text/html;
charset=iso-8859-1"><title>Tomcat FAQ - Memory</title><meta value="Tim Funk"
name="author"><meta value="[EMAIL PROTECTED]" name="email"><style>
+ dt { font-size : larger; font-weight : bold }
+ dd {padding-bottom : 10px;}
+ </style></head><body vlink="#525D76" alink="#525D76" link="#525D76"
text="#000000" bgcolor="#ffffff"><table cellspacing="4" width="100%"
border="0"><!--PAGE HEADER--><tr><td colspan="2"><!--JAKARTA LOGO--><a
href="http://jakarta.apache.org/"><img border="0" alt="The Jakarta Project"
align="left"
src="http://jakarta.apache.org//images/jakarta-logo.gif"></a><!--PROJECT
LOGO--><a href="http://jakarta.apache.org/tomcat/"><img border="0" alt="
+ Tomcat FAQ
+ " align="right" src="../../images/tomcat.gif"></a></td></tr><!--HEADER
SEPARATOR--><tr><td colspan="2"><hr size="1" noshade=""></td></tr><tr><!--RIGHT
SIDE MAIN BODY--><td align="left" valign="top" width="80%"><table
cellspacing="4" width="100%" border="0"><tr><td nowrap="true" valign="top"
align="left"><h1>Tomcat FAQ</h1><h2>Memory</h2></td><td nowrap="true"
valign="top" align="right"><img border="0" hspace="0" vspace="0" height="1"
width="1" src="../../images/void.gif"></td></tr></table><table cellpadding="2"
cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font
face="arial,helvetica.sanserif" color="#ffffff"><a
name="Preface"><strong>Preface</strong></a></font></td></tr><tr><td><blockquote>
+ <p>
+ This page discusses various memory issues. In a nutshell - if your
+ computer has less than 128MB of ram - you will probably have trouble.
+ Anyhow, also read the following threads for other memory related issues:
+ <ul>
+ <li>
+ <a href="http://marc.theaimsgroup.com/?t=104388973000006&r=1&w=2">
+ java.lang.OutOfMemoryError during deploy
+ </a>
+ </li>
+
+ <li>
+ <a href="http://marc.theaimsgroup.com/?t=104378347700007&r=1&w=2">
+ Memory requirements
+ </a>
+ </li>
+
+ <li>
+ <a href="http://marc.theaimsgroup.com/?t=104333066400004&r=1&w=2">
+ Memory Mgmt Tomcat
+ </a>
+ </li>
+
+ <li>
+ <a href="http://marc.theaimsgroup.com/?t=103011379700006&r=1&w=2">
+ Tomcat Out of memory
+ </a>
+ </li>
+
+ <li>
+ <a href="http://marc.theaimsgroup.com/?t=104519961700002&r=1&w=2">
+ Tracking memory usage over time
+ </a>
+ </li>
+
+ </ul>
+</p>
+<p>
+ Also look at
+ <a href="http://java.quest.com/jprobe/jprobe.shtml">JProbe</a>,
+ or <a href="http://www.borland.com/optimizeit/">OptimizeIt</a>, or other
+ profiling tools. Lots of people recommend these tools.
+ This is not an endorsement for them, I just
+ notice other people like them.
+</p>
+
+ <table cellpadding="2" cellspacing="0" border="0"><tr><td
bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a
name="JSP Recompilation"><strong>JSP
Recompilation</strong></a></font></td></tr><tr><td><blockquote>
+ <p>
+ If your application uses JSPs which are frequently recompiled
+ at runtime, e.g. headers that change value hourly, please make
+ sure to read the JSP HOW-TO page and RELEASE NOTES documents.
+ You may wish to tune the JSP compiler configuration to prevent
+ memory leaks. Of course, these are documents you should have
+ read by now anyways..
+ </p>
+ </blockquote></td></tr></table>
+
+</blockquote></td></tr></table><table cellpadding="2" cellspacing="0"
border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif"
color="#ffffff"><a
name="Questions"><strong>Questions</strong></a></font></td></tr><tr><td><blockquote>
+<p>
+ <ul>
+ <li><a href="#adjust"> How do I adjust memory settings?</a></li>
+ <li><a href="#why"> Why do I get OutOfMemoryError errors?</a></li>
+ <li><a href="#howmuch"> How much memory is tomcat/webapp/???
using?</a></li>
+ </ul>
+</p>
+</blockquote></td></tr></table><table cellpadding="2" cellspacing="0"
border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif"
color="#ffffff"><a
name="Answers"><strong>Answers</strong></a></font></td></tr><tr><td><blockquote>
+
+ <b style="font-size: larger">
+ <a name="adjust">
+ How do I adjust memory settings?
+ </a>
+ </b>
+ <div style="padding-left : 20px;">
+ First look at <code>java -X</code> to determine what parameters to set.
+ Then you can set them via the environment variable
<code>JAVA_OPTS</code>.
+ Read the files catalina.bat or catalina.sh for
+ more information on JAVA_OPTS.
+ </div><br>
+
+
+ <b style="font-size: larger">
+ <a name="why">
+ Why do I get OutOfMemoryError errors?
+ </a>
+ </b>
+ <div style="padding-left : 20px;">
+ Many reasons.
+ <ul>
+ <li>
+ You're out of memory. Simple as that - add more to your heap.
+ </li>
+ <li>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.
+ </li>
+ <li>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 <code>ulimit</code> 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.
+ </li>
+ <li>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.
+ </li>
+ <li>
+ 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 <code>-XX:MaxPermSize=256m</code> might be a good
start.
+ </li>
+ <li>Your OS limits the amount of memory your process may take. OK, this
+ one is grasping at straws.
+ </li>
+ <li> The JVM has a bug. This has been known to happen with JVM1.2.?
and using
+ EJB's with another servlet engine.
+ </li>
+ <li> Not actually a reason - but on your particular platform, look at
the
+ <code>java -X</code> options. They may be VERY helpful.
+ </li>
+ </ul>
+ </div><br>
+
+ <b style="font-size: larger">
+ <a name="howmuch">
+ How much memory is Tomcat/webapp/??? using?
+ </a>
+ </b>
+ <div style="padding-left : 20px;">
+ <ul>
+ <li>
+ To find out how much memory Tomcat is using, you might be able to
+ use the <code>Runtime</code> class provided by the JDK.
+ </li>
+ <li>
+ You can't find out how much memory a webapp is using. The JVM
+ doesn't give us these detail.
+ </li>
+ <li>
+ You can't find out how much memory a <i>???</i> is using. The JVM
+ doesn't give us these detail.
+ </li>
+ <li>
+ That being said, a memory profiling tool might prove the above
+ statements wrong - but you probably don't want to use them
+ in a production environment.
+ </li>
+ </ul>
+ </div><br>
+
+
+</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td
colspan="2"><hr size="1" noshade=""></td></tr><!--PAGE FOOTER--><tr><td
colspan="2"><div align="center"><font size="-1" color="#525D76"><em>
+ Copyright © 1999-2003, Apache Software Foundation
</em></font></div></td></tr></table></body></html>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]