Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 63323 invoked from network); 4 Jun 2002 08:24:18 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 4 Jun 2002 08:24:18 -0000 Received: (qmail 2241 invoked by uid 97); 4 Jun 2002 08:24:11 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 2225 invoked by uid 97); 4 Jun 2002 08:24:11 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 2210 invoked by uid 98); 4 Jun 2002 08:24:10 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Subject: Re: Out of Memory Error - plz help To: "Tomcat Users List" X-Mailer: Lotus Notes Release 5.0.5 September 22, 2000 Message-ID: From: oz@veon.com Date: Tue, 4 Jun 2002 11:22:41 +0200 X-MIMETrack: Serialize by Router on milan/Philips(Release 5.0.8 |June 18, 2001) at 06/04/2002 11:22:49 AM MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Small correction. In item 2, the path for the config file in linux rpm installation is /etc/tomcat/conf/tomcat4.conf oz@veon.com To: "Tomcat Users List" 06/04/2002 cc: 10:33 AM Subject: Re: Out of Memory Error - plz help Please respond to "Tomcat Users List" I'm not sure this answers your question, but hopefully: 1. I can't say what the cause for the out of memory error is, but if you are writing in Java (JSP or servlet), you can try and check the memory status on your computer. This is done by: Runtime rt = Runtime.getRuntime(); long mem = rt.totalMemory(); long freemem = rt.freeMemory(); The first line gives you a runtime environment, the second one gives you the amount of memory the JAVA Runtime Environment (JRE) currently possesses, and the third line gives you the amount of available memory. This should help you debug and find the mischievous code. 2. In order to launch the JRE with more memory, you can set the JAVA_OPTS environment variable, which Catalina uses, in the following manner: JAVA_OPTS="-ms10M -mx512M" -ms sets the minimum amount of memory for the JRE, in this case it's set to 10MB. -mx sets the maximum amount of memory (I think the default is 64MB, which should be quite a lot, I don't know why your program runs out of memory). The place where you set the JAVA_OPTS depends on your platform and installation. All I can tell you is that if you installed Tomcat with RPM on linux, then you best add this line to the file /etc/init.d/tomcat/tomcat4.conf . As for other installations, check to see where the catalina.bat or catalina.sh file is, usually this is the place to update. 3. Finally (sorry for the lengthy answer), you can add a try catch around your code. Be aware, however that your catch should catch "Error" since OutOfMemoryError doesn't extend Exception, so you should do something like this: try { code... } catch (Exception e) { } cacth (Error e) { } Oz. # Lalit Nagpal # To: tomcat-user@jakarta.apache.org Subject: Out of Memory Error - plz help 06/04/2002 07:37 AM Please respond to "Tomcat Users List" hello friends, I get this wierd error "Out of Memory --- No Stack Trace". Actually i have a form that a student fills up attaches his mark statement (scanned image) and photograph. The form is received properly on the server but then the server goes down any time - giving the output as << Out of Memory Error - No Stack Trace >> in catalina.out file. Any ideas, plz help Regards ===== # Lalit Nagpal # __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: < mailto:tomcat-user-unsubscribe@jakarta.apache.org> For additional commands, e-mail: < mailto:tomcat-user-help@jakarta.apache.org> -- To unsubscribe, e-mail: < mailto:tomcat-user-unsubscribe@jakarta.apache.org> For additional commands, e-mail: < mailto:tomcat-user-help@jakarta.apache.org> -- To unsubscribe, e-mail: For additional commands, e-mail: