Re: Increasing Tomcat/Java memory
Thanks for all the replies, but I think the problem was really only that I didn't set the memory size correctly for Tomcat Service in WinXP (with environment var CATALINA_OPTS instead of registry values) and the export really needed more than the default 64M memory (or that what was remaining of this). With kind regards, Harald Henkel Harald Henkel wrote: > > Hello everybody. > > How can I increase the memory Tomcat/Java is using? > > I tried setting CATALINA_OPTS with -server -Xms256m -Xmx512m > but runtime.totalMemory always seems to return a value around 60MB. > > And there are some operations (exporting several thousand database > records to an Excel file) where we receive out of memory errors. > Unfortunately I don't yet know the exact error text and where it is > displayed... > > Yet, if the server (including database) is rebootet it works, so it > seems to be a problem with Tomcat (oracle doesn't seem to have a problem, > because the data is already dispalyed in a table genereated by tomcat (JSP). > Only if I try to export this data to an exel file, the problem arised. > > This is on Windows XP Pro SP2. > > Anybody got an idea? Can this be due to Tomcat memory management? How to > change it correctly on windows ? > > Somewhere I saw -ms and -mx insead of -Xms and -Xmx > > Any help appreciated! > > With kind regards, > Harald Henkel > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Harald Henkel GS automation GmbH Winterstraße 2 82223 Eichenau Germany Tel:+ 49-8141-35 731-37 Fax:+ 49-8141-35 731-38 Mobile: + 49-178-7829126 e-mail: [EMAIL PROTECTED] Web:www.GS-automation.DE - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Increasing Tomcat/Java memory
> From: David Delbecq [mailto:[EMAIL PROTECTED] > Subject: Re: Increasing Tomcat/Java memory > 4) More funny, a java.lang.OutOfMemoryError can also occur > when you run out of process threads An OOME is really a catch-all for exhaustion of any system resource. One other common cause is running out of file descriptors. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Increasing Tomcat/Java memory
Thanks a lot for your reply. I set the values directly in my registry, restarted Tomcat and voilá: runtime.totalMemory now gives the increased -Xms value after startup. With kind regards, Harald Henkel Jost Richstein schrieb: These settings are stored in the r egistry if you are running Tomcat as windows service. Usually you have a small applet installed that allows you to edit the setttings. If do not see the applet, try to execute \bin\tomcat5w.exe" //ES//TomcatServiceName where "TomcatServiceName" is your Windows Servicename for Tomcat. Harald Henkel wrote: Hello everybody. How can I increase the memory Tomcat/Java is using? I tried setting CATALINA_OPTS with -server -Xms256m -Xmx512m but runtime.totalMemory always seems to return a value around 60MB. And there are some operations (exporting several thousand database records to an Excel file) where we receive out of memory errors. Unfortunately I don't yet know the exact error text and where it is displayed... Yet, if the server (including database) is rebootet it works, so it seems to be a problem with Tomcat (oracle doesn't seem to have a problem, because the data is already dispalyed in a table genereated by tomcat (JSP). Only if I try to export this data to an exel file, the problem arised. This is on Windows XP Pro SP2. Anybody got an idea? Can this be due to Tomcat memory management? How to change it correctly on windows ? Somewhere I saw -ms and -mx insead of -Xms and -Xmx Any help appreciated! With kind regards, Harald Henkel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Increasing Tomcat/Java memory
Harald Henkel a écrit : > Hello everybody. > > How can I increase the memory Tomcat/Java is using? > > I tried setting CATALINA_OPTS with -server -Xms256m -Xmx512m > but runtime.totalMemory always seems to return a value around 60MB. > that mean the java machine did not require more. the 512M is reflected in runtime.maxMemory() There are several reasons for an out of memory message: 1) maxMemory() has been reached (according to your message this doesn't seems the case, unless you didn't check memory during loading process and you ended up filling java memory with the whole database) 2) jvm encountered a system memory exhaustion: you say java can use 512M, but system memory available in both physical memory and swap space is less (not very likely, and you will probably encounter problem with other applications if it was the case) 3) ran out of permgen size. Most likely to happen if you do several reload of your webapp and the webapp has classloader memoryleaks issues (has been discussed lots of times on this mailing lsit, search the mailing list history) 4) More funny, a java.lang.OutOfMemoryError can also occur when you run out of process threads (Each OS has a maximum to the number of threads a process can create. For HP-UX we discovered with java this was around 4096 threads :p) > And there are some operations (exporting several thousand database > records to an Excel file) where we receive out of memory errors. > Unfortunately I don't yet know the exact error text and where it is > displayed... > > Yet, if the server (including database) is rebootet it works, so it > seems to be a problem with Tomcat (oracle doesn't seem to have a problem, > because the data is already dispalyed in a table genereated by tomcat > (JSP). > Only if I try to export this data to an exel file, the problem arised. Look closely at your code, add debug statements about available memory during export process, use a profiling tool to find where your memory goes, run tomcat in a debugger and interrupt on outofmemoryexception. This is most probably a problem with the web application, not with tomcat. Check your code. > > This is on Windows XP Pro SP2. > > Anybody got an idea? Can this be due to Tomcat memory management? How > to change it correctly on windows ? > > Somewhere I saw -ms and -mx insead of -Xms and -Xmx > > Any help appreciated! > > With kind regards, > Harald Henkel > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Increasing Tomcat/Java memory
These settings are stored in the r egistry if you are running Tomcat as windows service. Usually you have a small applet installed that allows you to edit the setttings. If do not see the applet, try to execute \bin\tomcat5w.exe" //ES//TomcatServiceName where "TomcatServiceName" is your Windows Servicename for Tomcat. Harald Henkel wrote: Hello everybody. How can I increase the memory Tomcat/Java is using? I tried setting CATALINA_OPTS with -server -Xms256m -Xmx512m but runtime.totalMemory always seems to return a value around 60MB. And there are some operations (exporting several thousand database records to an Excel file) where we receive out of memory errors. Unfortunately I don't yet know the exact error text and where it is displayed... Yet, if the server (including database) is rebootet it works, so it seems to be a problem with Tomcat (oracle doesn't seem to have a problem, because the data is already dispalyed in a table genereated by tomcat (JSP). Only if I try to export this data to an exel file, the problem arised. This is on Windows XP Pro SP2. Anybody got an idea? Can this be due to Tomcat memory management? How to change it correctly on windows ? Somewhere I saw -ms and -mx insead of -Xms and -Xmx Any help appreciated! With kind regards, Harald Henkel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Increasing Tomcat/Java memory
Hello everybody. How can I increase the memory Tomcat/Java is using? I tried setting CATALINA_OPTS with -server -Xms256m -Xmx512m but runtime.totalMemory always seems to return a value around 60MB. And there are some operations (exporting several thousand database records to an Excel file) where we receive out of memory errors. Unfortunately I don't yet know the exact error text and where it is displayed... Yet, if the server (including database) is rebootet it works, so it seems to be a problem with Tomcat (oracle doesn't seem to have a problem, because the data is already dispalyed in a table genereated by tomcat (JSP). Only if I try to export this data to an exel file, the problem arised. This is on Windows XP Pro SP2. Anybody got an idea? Can this be due to Tomcat memory management? How to change it correctly on windows ? Somewhere I saw -ms and -mx insead of -Xms and -Xmx Any help appreciated! With kind regards, Harald Henkel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]