You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by yo...@apache.org on 2003/12/19 18:23:59 UTC
cvs commit: jakarta-tomcat-site/xdocs-faq memory.xml
yoavs 2003/12/19 09:23:59
Modified: docs/faq memory.html
docs/faq/printer memory.html
xdocs-faq memory.xml
Log:
Added yet another note regarding JSP recompilation memory leak.
Revision Changes Path
1.7 +14 -0 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.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- memory.html 26 Aug 2003 09:08:17 -0000 1.6
+++ memory.html 19 Dec 2003 17:23:59 -0000 1.7
@@ -41,6 +41,8 @@
</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
@@ -48,6 +50,18 @@
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>
1.4 +157 -143 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.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- memory.html 21 Aug 2003 00:56:40 -0000 1.3
+++ memory.html 19 Dec 2003 17:23:59 -0000 1.4
@@ -1,144 +1,158 @@
-<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="funkman@apache.org" 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>
- 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>
-</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="funkman@apache.org" 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
</em></font></div></td></tr></table></body></html>
1.4 +14 -0 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.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- memory.xml 21 Aug 2003 00:53:56 -0000 1.3
+++ memory.xml 19 Dec 2003 17:23:59 -0000 1.4
@@ -51,6 +51,8 @@
</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
@@ -58,6 +60,18 @@
This is not an endorsement for them, I just
notice other people like them.
</p>
+
+ <subsection name="JSP Recompilation">
+ <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>
+ </subsection>
+
</section>
<section name="Questions">
<p>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org