Re: help to solve 'OutOfMemoryError'
Hi, I don't have any idea about the Linux environment. But, I got a OutOfMemoryError due to permgen space on windows/Tomcat5.0.30 environment and this is what I have done. set CATALINA_OPTS in catalina.bat if Tomcat is started using startup.bat set CATALINA_OPTS=-Xms128m -Xmx512m -XX:MaxPermSize=256m and if Tomcat is started as a service then JVMOptions is set in service.bat "%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.io.tmpdir=%CATALINA_BASE%\temp;" --JvmMs 128 --JvmMx 512 Hope this helps. Thank you. "Leon Rosenberg" <[EMAIL PROTECTED]> 01/26/2006 09:25 AM Please respond to "Tomcat Users List" To "Tomcat Users List" , [EMAIL PROTECTED] cc Subject Re: help to solve 'OutOfMemoryError' Could you please provide a little more details, on what kind of program you are doing, how you are starting it right now, and how is tomcat involved? generally -Xmx128m -Xmx256m, are parameters to java call, besides you can't have two different values for the same parameter! (I think the first one is ms, right?) java -Xms128m -Xmx256m -cp bla:blub:blib your.package.YourClass For tomcat you need to alter JAVA_OPTS in catalina.sh/bat to even those values: set JAVA_OPTS=-Dms128M -Dmx256M ... under windows and export JAVA_OPTS="-mx256M -ms128M ... under *nix. regards Leon On 1/26/06, Aparna Ramakrishnan <[EMAIL PROTECTED]> wrote: > Hi, > > Thanks for the link. > When i start my program, the Runtime Maximum Heap Size is 66650112 bytes ~=64MB. I believe I should increase this value to atleast 256 MB. But how do I go about doing this? I understand that I need to add an option -Xmx128m -Xmx256m, but to what and how! > Kindly guide me through.. since I am completely new to this ground. > > Thanks in advance > Aparna > > "Caldarale, Charles R" <[EMAIL PROTECTED]> wrote: > > From: Aparna Ramakrishnan [mailto:[EMAIL PROTECTED] > > Subject: help to solve 'OutOfMemoryError' > > > > What changes do I need to make to avoid this > > OutOfMemoryError? > > The question is too generic for anyone to provide a concrete answer. > Start here: > http://tomcat.apache.org/faq/memory.html > > Do some reading on how JVM heap management works - Sun's Java web site > has some pretty decent tutorials and tech papers. > > - 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] > > > > > > - > Do you Yahoo!? > With a free 1 GB, there's more in store with Yahoo! Mail. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FW: Tomcat upgrade: 3.3.1 --> 5.0.28, hang up after running 1 or 2 days
Hi Monica, For the past few days I was working on PermGen/Heap space issues. Last night I cold fix this problem after a very long research. I was getting OutOfMemoryError due to PermGen space. I have set -XX:MaxPermGen parameter in my service.bat. Here is the code sample : "%EXECUTABLE%" //US//%SERVICE_NAME% --JvmOptions "-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.endorsed.dirs=%CATALINA_HOME%\common\endorsed;-XX:PermSize=128m;-XX:MaxPermSize=256m" --StartMode jvm --StopMode jvm This is the configuration setting if you are starting Tomcat as a service. FYI : My Tomcat version is 5.0.30. Note: Must be very careful with the syntax. Hope this will help you. Aparna "Monica Wu" <[EMAIL PROTECTED]> 01/19/2006 04:06 PM Please respond to "Tomcat Users List" To "Tomcat Users List" cc Subject RE: FW: Tomcat upgrade: 3.3.1 --> 5.0.28, hang up after running 1 or 2 days Thanks, Glen! Upgrading to 5.5.x is an idea. Another one is about PermGen space, suggested by Chunk in earlier message in this thread. So far I don't have confidence that TC5.5 can fix the problem my TC5.0 has. I will try to tune up PermGen space parameter and see how it goes. By following Chunk's email, I am googling how to tune up PermGen parameter. I will do followup for progress. Thank you! - Monica -Original Message- From: Glen Mazza [mailto:[EMAIL PROTECTED] Sent: Thursday, January 19, 2006 3:48 PM To: Tomcat Users List Subject: Re: FW: Tomcat upgrade: 3.3.1 --> 5.0.28, hang up after running 1 or 2 days Monica Wu wrote: > Production tomcat server was upgraded from 3.3.1 to 5.0.28 about 3 weeks ago. It hang up every 1 or 2 days during weekdays, depending on web server traffic. Unfortunately, I don't know enough to be able to help you here, but since 5.0.28 isn't working anyway, have you considered upgrading to 5.5.x to see if that would fix the problem? Glen - 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: Do anyone know how to set PermGen space ? [was RE: Latest stable version of Tomcat]
HI George, Thank you for the reply. I tried to use this option in my service.bat but when I start the service its giving error.(FYI: I am using Tomcat 5.5.12.) Then I set in CATALINA_OPTS but its not taking the PermSize/MaxPermSize values. Thank you, Aparna. "George Sexton" <[EMAIL PROTECTED]> 01/18/2006 03:09 PM Please respond to "Tomcat Users List" To "'Tomcat Users List'" cc Subject RE: Do anyone know how to set PermGen space ? [was RE: Latest stable version of Tomcat] Here's what I use: -server -Xms512m -Xmx768m -XX:PermSize=128m -XX:MaxPermSize=192m -Djava.awt.headless=true Unless you specify "PermSize", it will default to 64MB, and grow to MaxPermSize George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: Wednesday, January 18, 2006 3:57 PM > To: Tomcat Users List > Subject: RE: Do anyone know how to set PermGen space ? [was > RE: Latest stable version of Tomcat] > > I tried with -XX:MaxPermSize=128m too. > but, its not working. any other suggestions ?? > > Thank you, > Aparna > > > > > > "Tim Lucia" <[EMAIL PROTECTED]> > 01/18/2006 12:26 PM > Please respond to > "Tomcat Users List" > > > To > "'Tomcat Users List'" > cc > > Subject > RE: Do anyone know how to set PermGen space ? [was RE: Latest stable > version of Tomcat] > > > > > > > PermGen Max is 128m > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: Wednesday, January 18, 2006 2:43 PM > To: Tomcat Users List > Subject: RE: Do anyone know how to set PermGen space ? [was RE: Latest > stable version of Tomcat] > > hi, > > As you said, I set on service manger's Java tab like this : > > -Dcatalina.opts=-XX:MaxPermSize=256m > > I ran a jsp which shows the Memery usage. > Its showing correct values for Xmx, Xms but for PermGen it > still showing > the default 64mb. > Do you have any idea ? Is PermGen setting working for you> > > Thank you, > Aparna. > > > > > "Tim Lucia" <[EMAIL PROTECTED]> > 01/18/2006 10:30 AM > Please respond to > "Tomcat Users List" > > > To > "'Tomcat Users List'" > cc > > Subject > RE: Do anyone know how to set PermGen space ? [was RE: Latest stable > version of Tomcat] > > > > > > > Wherever/however you start your JVM. In line with -Xmx -XMs > should work > fine. I set mine (under Windows) on the service manager, > under the Java > tab > and (under Linux) in bin/setenv.sh by adding it to CATALINA_OPTS. > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: Wednesday, January 18, 2006 1:24 PM > To: Tomcat Users List > Subject: RE: Do anyone know how to set PermGen space ? [was RE: Latest > stable version of Tomcat] > > Hi Tim, > > Thank you for the reply. > > But, where should I set this. > Is it in service.bat file ? If so is the following line correct ?? > > "%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions > "-Djava.io.tmpdir=%CATALINA_BASE%\temp" --JvmMs 512 --JvmMx 512 > --JvmX:MaxPermSize=512m > > And how to check if jvm is taking these values? Will they be > inserted in > the registry ? > I set JvmMs, JvnMx and --JvmX:MaxPermSize and then started > the service. > Now, how to make sure if JVM is taking these values ? > > Any help would be greatly appericiated. > > Thank you, > Aparna > > > > > > > "Tim Lucia" <[EMAIL PROTECTED]> > 01/18/2006 10:09 AM > Please respond to > "Tomcat Users List" > > > To > "'Tomcat Users List'" > cc > > Subject > RE: Do anyone know how to set PermGen space ? [was RE: Latest stable > version of Tomcat] > > > > > > > -XX:MaxPermSize=... [128m, for example] > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: Wednesday, January 18, 2006 1:02 PM > To: Tomcat Users List > Subject: Re: Latest stable version of Tomcat > > Thank you for the reply. > > Do anyone know how to set PermGen space ? > > > Thank you, > Aparna > > > > > - > 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] > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Do anyone know how to set PermGen space ? [was RE: Latest stable version of Tomcat]
I tried with -XX:MaxPermSize=128m too. but, its not working. any other suggestions ?? Thank you, Aparna "Tim Lucia" <[EMAIL PROTECTED]> 01/18/2006 12:26 PM Please respond to "Tomcat Users List" To "'Tomcat Users List'" cc Subject RE: Do anyone know how to set PermGen space ? [was RE: Latest stable version of Tomcat] PermGen Max is 128m -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 18, 2006 2:43 PM To: Tomcat Users List Subject: RE: Do anyone know how to set PermGen space ? [was RE: Latest stable version of Tomcat] hi, As you said, I set on service manger's Java tab like this : -Dcatalina.opts=-XX:MaxPermSize=256m I ran a jsp which shows the Memery usage. Its showing correct values for Xmx, Xms but for PermGen it still showing the default 64mb. Do you have any idea ? Is PermGen setting working for you> Thank you, Aparna. "Tim Lucia" <[EMAIL PROTECTED]> 01/18/2006 10:30 AM Please respond to "Tomcat Users List" To "'Tomcat Users List'" cc Subject RE: Do anyone know how to set PermGen space ? [was RE: Latest stable version of Tomcat] Wherever/however you start your JVM. In line with -Xmx -XMs should work fine. I set mine (under Windows) on the service manager, under the Java tab and (under Linux) in bin/setenv.sh by adding it to CATALINA_OPTS. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 18, 2006 1:24 PM To: Tomcat Users List Subject: RE: Do anyone know how to set PermGen space ? [was RE: Latest stable version of Tomcat] Hi Tim, Thank you for the reply. But, where should I set this. Is it in service.bat file ? If so is the following line correct ?? "%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.io.tmpdir=%CATALINA_BASE%\temp" --JvmMs 512 --JvmMx 512 --JvmX:MaxPermSize=512m And how to check if jvm is taking these values? Will they be inserted in the registry ? I set JvmMs, JvnMx and --JvmX:MaxPermSize and then started the service. Now, how to make sure if JVM is taking these values ? Any help would be greatly appericiated. Thank you, Aparna "Tim Lucia" <[EMAIL PROTECTED]> 01/18/2006 10:09 AM Please respond to "Tomcat Users List" To "'Tomcat Users List'" cc Subject RE: Do anyone know how to set PermGen space ? [was RE: Latest stable version of Tomcat] -XX:MaxPermSize=... [128m, for example] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 18, 2006 1:02 PM To: Tomcat Users List Subject: Re: Latest stable version of Tomcat Thank you for the reply. Do anyone know how to set PermGen space ? Thank you, Aparna - 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: Do anyone know how to set PermGen space ? [was RE: Latest stable version of Tomcat]
hi, As you said, I set on service manger's Java tab like this : -Dcatalina.opts=-XX:MaxPermSize=256m I ran a jsp which shows the Memery usage. Its showing correct values for Xmx, Xms but for PermGen it still showing the default 64mb. Do you have any idea ? Is PermGen setting working for you> Thank you, Aparna. "Tim Lucia" <[EMAIL PROTECTED]> 01/18/2006 10:30 AM Please respond to "Tomcat Users List" To "'Tomcat Users List'" cc Subject RE: Do anyone know how to set PermGen space ? [was RE: Latest stable version of Tomcat] Wherever/however you start your JVM. In line with -Xmx -XMs should work fine. I set mine (under Windows) on the service manager, under the Java tab and (under Linux) in bin/setenv.sh by adding it to CATALINA_OPTS. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 18, 2006 1:24 PM To: Tomcat Users List Subject: RE: Do anyone know how to set PermGen space ? [was RE: Latest stable version of Tomcat] Hi Tim, Thank you for the reply. But, where should I set this. Is it in service.bat file ? If so is the following line correct ?? "%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.io.tmpdir=%CATALINA_BASE%\temp" --JvmMs 512 --JvmMx 512 --JvmX:MaxPermSize=512m And how to check if jvm is taking these values? Will they be inserted in the registry ? I set JvmMs, JvnMx and --JvmX:MaxPermSize and then started the service. Now, how to make sure if JVM is taking these values ? Any help would be greatly appericiated. Thank you, Aparna "Tim Lucia" <[EMAIL PROTECTED]> 01/18/2006 10:09 AM Please respond to "Tomcat Users List" To "'Tomcat Users List'" cc Subject RE: Do anyone know how to set PermGen space ? [was RE: Latest stable version of Tomcat] -XX:MaxPermSize=... [128m, for example] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 18, 2006 1:02 PM To: Tomcat Users List Subject: Re: Latest stable version of Tomcat Thank you for the reply. Do anyone know how to set PermGen space ? Thank you, Aparna - 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: Do anyone know how to set PermGen space ? [was RE: Latest stable version of Tomcat]
Hi Tim, Thank you for the reply. But, where should I set this. Is it in service.bat file ? If so is the following line correct ?? "%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.io.tmpdir=%CATALINA_BASE%\temp" --JvmMs 512 --JvmMx 512 --JvmX:MaxPermSize=512m And how to check if jvm is taking these values? Will they be inserted in the registry ? I set JvmMs, JvnMx and --JvmX:MaxPermSize and then started the service. Now, how to make sure if JVM is taking these values ? Any help would be greatly appericiated. Thank you, Aparna "Tim Lucia" <[EMAIL PROTECTED]> 01/18/2006 10:09 AM Please respond to "Tomcat Users List" To "'Tomcat Users List'" cc Subject RE: Do anyone know how to set PermGen space ? [was RE: Latest stable version of Tomcat] -XX:MaxPermSize=... [128m, for example] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 18, 2006 1:02 PM To: Tomcat Users List Subject: Re: Latest stable version of Tomcat Thank you for the reply. Do anyone know how to set PermGen space ? Thank you, Aparna - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Latest stable version of Tomcat
Thank you for the reply. Do anyone know how to set PermGen space ? Thank you, Aparna [EMAIL PROTECTED] 01/18/2006 08:27 AM Please respond to "Tomcat Users List" To users@tomcat.apache.org cc Subject Re: Latest stable version of Tomcat 5.5.12 Hi, Could anyone tell me what is the latest stable version of tomcat on JDK1.5
Latest stable version of Tomcat
Hi, Could anyone tell me what is the latest stable version of tomcat on JDK1.5 Thank you.
Re: [OT] 64Bit Java doesn't honour Xmx,Xms settings?
Hi, I am setting the PermGen with JvmX option (JvmX 256mb). Thank you, Aparna "Peter Lin" <[EMAIL PROTECTED]> 01/17/2006 09:15 AM Please respond to "Tomcat Users List" To "Tomcat Users List" cc Subject Re: [OT] 64Bit Java doesn't honour Xmx,Xms settings? permgen isn't affected by the normal -Xms -Xmx you have to explicitly set the permGen using the proper setting. I forget the exact syntax at the moment, but it should be archived on the mailing list. peter On 1/17/06, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: > > Hi, > > > Did you check if the new parameter (Xms, Xmx)values are registered for > your service ? (I am not sure how it works on Linux ). > Here is a similar issue but on Windows platform. > I am working with 64 bit java on Windows 2003 and 64-bit AMD Opteron > processor with 16 GB RAM. > I am getting OOME due to PermGen space. I set the following parameteres in > my service.bat file : > JvmXms = 6g JvmXmx = 6g JvmX = 256mb. > The problem is when I start the tomcat service it is not taking these > values. I checked the windows registry > and these parameter values are not inserted. Do you have any idea like > what might be the problem and > how to fix these issue ? Any help would be greatly appereciated. > > (Note: The same application on 32-bit works just fine .) > > Thank you, > Aparna. > > > > >
Re: [OT] 64Bit Java doesn't honour Xmx,Xms settings?
Hi, Did you check if the new parameter (Xms, Xmx)values are registered for your service ? (I am not sure how it works on Linux ). Here is a similar issue but on Windows platform. I am working with 64 bit java on Windows 2003 and 64-bit AMD Opteron processor with 16 GB RAM. I am getting OOME due to PermGen space. I set the following parameteres in my service.bat file : JvmXms = 6g JvmXmx = 6g JvmX = 256mb. The problem is when I start the tomcat service it is not taking these values. I checked the windows registry and these parameter values are not inserted. Do you have any idea like what might be the problem and how to fix these issue ? Any help would be greatly appereciated. (Note: The same application on 32-bit works just fine .) Thank you, Aparna. "Leon Rosenberg" <[EMAIL PROTECTED]> 01/17/2006 03:43 AM Please respond to "Tomcat Users List" To "Tomcat Users List" cc Subject Re: [OT] 64Bit Java doesn't honour Xmx,Xms settings? On 1/17/06, Tim Funk <[EMAIL PROTECTED]> wrote: > Just because you get an OOM error doesn't mean its a heap issue. See the faq > for details: > > http://tomcat.apache.org/faq/memory.html#why > > -Tim Sure, but when ps shows virtual memory usage of 34 GB, I assume it's a memory issue, isn't it? P.S. (There is no tomcat involed :-) ) > > Leon Rosenberg wrote: > > Hi, > > > > sorry for OT, but since there is so much combined Java experience > > here, it's the fastest way of getting an answer. > > > > We have problems with 64bit java (on amd/debian64, with16GB real > > memory). Regardsless how much memory we allow the vm (via -Xmx, -Xms) > > it takes all it can (up to 34gb virtual memory, 16Gb real memory). > > Since we have more than one VM running on the machine (5VMs all below > > 1Gb ram) we are running in an outofmemory after a day of running. > > > > Is this a bug? Are there any new undocumented switches for proper > > memory configuration? > > > > - > 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]