Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 45783 invoked from network); 28 Nov 2007 19:03:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Nov 2007 19:03:40 -0000 Received: (qmail 40017 invoked by uid 500); 28 Nov 2007 19:03:20 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 39948 invoked by uid 500); 28 Nov 2007 19:03:20 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 39937 invoked by uid 500); 28 Nov 2007 19:03:20 -0000 Delivered-To: apmail-jakarta-tomcat-dev@jakarta.apache.org Received: (qmail 39934 invoked by uid 99); 28 Nov 2007 19:03:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Nov 2007 11:03:20 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.130] (HELO eos.apache.org) (140.211.11.130) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Nov 2007 19:03:23 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id A98D7D2D4 for ; Wed, 28 Nov 2007 19:03:02 +0000 (GMT) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki To: tomcat-dev@jakarta.apache.org Date: Wed, 28 Nov 2007 19:03:02 -0000 Message-ID: <20071128190302.25696.21795@eos.apache.org> Subject: [Tomcat Wiki] Update of "FAQ/Bugs/Memory" by GianlucaVarisco X-Virus-Checked: Checked by ClamAV on apache.org 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 ------------------------------------------------------------------------------ * 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. * The JVM has a bug. This has been known to happen with JVM1.2.? and using EJB's with another servlet engine. * Not actually a reason - but on your particular platform, look at the {{{java -X}}} options. They may be VERY helpful. - * Your classloaders are not being garbage collected. + * [http://opensource2.atlassian.com/confluence/spring/pages/viewpage.action?pageId=2669 Your classloaders are not being garbage collected]. '''How much memory is Tomcat/webapp/??? using?''' - * To find out how much memory Tomcat is using, you might be able to use the Runtime class provided by the JDK. + * To find out how much memory Tomcat is using, you might be able to use the {{{Runtime}}} class provided by the JDK. * You can't find out how much memory a webapp is using. The JVM doesn't give us these detail. * You can't find out how much memory a ??? is using. The JVM doesn't give us these detail. * 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. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org