RE: Tomcat Causes Server to go Panic/Crash
Hi Charles, Thanks for the advice. apologies for being stubborn. I'll change the JVM and set the CATALINA_OPTS in the setenv.sh Best regards, Adrian Caldarale, Charles R chuck.caldar...@unisys.com 11/19/2011 01:18 AM Please respond to Tomcat Users List users@tomcat.apache.org To Tomcat Users List users@tomcat.apache.org cc Subject RE: Tomcat Causes Server to go Panic/Crash From: Adrian Zara [mailto:adrian.z...@aonhewitt.com] Subject: Re: Tomcat Causes Server to go Panic/Crash I just learned that the JVM I am using is Java HotSpot (TM) Client VM (build 1.4.2_19-b04, mixed mode) Which hasn't been supported for many years. (1.5 is also not supported, unless you pay Oracle.) You really, really need to upgrade everything. So I go back again to my drwaing board to analyze the issue. Please advise again. Let's repeat: 1) put catalina.sh back to its original form, as distributed by Tomcat 2) set CATALINA_OPTS in setenv.sh for a reasonable heap size - 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited. All messages sent to and from this e-mail address may be monitored as permitted by applicable law and regulations to ensure compliance with our internal policies and to protect our business. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, or contain viruses. You are deemed to have accepted these risks if you communicate with us by e-mail.
RE: Tomcat Causes Server to go Panic/Crash
Hi Chuck, Thanks again. I mentioned about setting the JAVA_OPTS because I thought that could be they key to my problem. Previously it was set to 512 and by the time it was set to 512, we were already experiencing panic issue that's why I thought of setting it to 1024. I am thinking about resetting the JAVA_OPTS to its previous value of 512. For several year, I did not experience the server panic issue even when the max heap is set to 512. But only recently last May when I deployed new codes in our war file, that's the time we experience server panic. I wonder which part of my code is too intensive for the Tomcat (or the JVM) to handle. So, I think we can leave the JAVA_OPTS thing and focus on the other, the JVM. With regards to the JVM, do you think it can push the server to its limit until it will finally gives up? Server's processor is 3.4GHz and memory is 2G. I will consider replacing the JVM with the ones you suggested. But for the meantime, while I do not have these better JVM's yet, I'll check of removing the AgressiveHeap option in the JAVA_OPTS as advised by Jürgen. Best regards, Adrian Caldarale, Charles R chuck.caldar...@unisys.com 11/18/2011 03:46 PM Please respond to Tomcat Users List users@tomcat.apache.org To Tomcat Users List users@tomcat.apache.org cc Subject RE: Tomcat Causes Server to go Panic/Crash From: Adrian Zara [mailto:adrian.z...@aonhewitt.com] Subject: Re: Tomcat Causes Server to go Panic/Crash As you can see in the JAVA_OPTS setting, I have set the max heap size to 1G which is 50% of the total physical memory and, if I'm not mistaken, I think we are running only one application in the tomcat so I don't think it's memory related but still not sure. Your problem highly likely is memory related. By setting JAVA_OPTS instead of CATALINA_OPTS you are trying to run both the Tomcat process and the shutdown process with 1 GB heaps each, plus the amount of memory needed for code, stacks, and other data areas of the two processes, plus whatever else is running in the machine. So put in a real JVM, set CATALINA_OPTS rather than JAVA_OPTS in setenv.sh, and try again. - 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited. All messages sent to and from this e-mail address may be monitored as permitted by applicable law and regulations to ensure compliance with our internal policies and to protect our business. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, or contain viruses. You are deemed to have accepted these risks if you communicate with us by e-mail.
Re: Tomcat Causes Server to go Panic/Crash
Hi Jürgen, Thanks a ton. I'll do as what you advised and also as told by Chuck, I will consider replacing my current JVM. I will revert back the heap size to its original value of 512, remove the AggressiveHeap option and specify an initial heap size value of 128. Best regards, Adrian Jürgen Link juergen.l...@googlemail.com 11/18/2011 03:58 PM Please respond to Tomcat Users List users@tomcat.apache.org To Tomcat Users List users@tomcat.apache.org cc Subject Re: Tomcat Causes Server to go Panic/Crash Hi Adrian, specifying 1G heap size does not limit your process's mem consumption to 1G, there's much more inside a JVM than heap! If I got you right, your physical mem is 2G, right? Well, having two processes (running tomcat instance + tomcat shutdown process, which is a new JVM instance) with 1G heap each will hit your system badly, for sure. Try to remove AggressiveHeap option, I don't think it is of much help to you. Consider specifying the initial heap size with 128M or so, this will keep at least the shutdown process at a decent size. Cheers Jürgen 2011/11/18 Adrian Zara adrian.z...@aonhewitt.com Hi Jürgen, Thanks for the info. Honestly, I don't know whether it's due to memory outage. But something is happening during the shutdown process. As you can see in the JAVA_OPTS setting, I have set the max heap size to 1G which is 50% of the total ph ysical memory and, if I'm not mistaken, I think we are running only one application in the tomcat so I don't think it's memory related but still not sure. The weird thing is instead that only the tomcat is supposed to crash, the whole server does. If I set the AgressiveHeap option is there still a possibility to eat up all the availble memory even if I set the max heap size? Best regards, Adrian Jürgen Link juergen.l...@googlemail.com 11/18/2011 02:59 PM Please respond to Tomcat Users List users@tomcat.apache.org To Tomcat Users List users@tomcat.apache.org cc Subject Re: Tomcat Causes Server to go Panic/Crash Hi Adrian, you might want to replace the AggressiceHeap option by a decent initial heap size, e.g. Xms=64m. AggressiveHeap seems to eat up all available memory: [...] The size of the initial heap is calculated based on the size of the physical memory and attempts to make maximal use of the physical memory for the heap (i.e., the algorithms attempt to use heaps nearly as large as the total physical memory). (see http://java.sun.com/docs/hotspot/gc1.4.2/#4.2.2.%20AggressiveHeap%7Coutline ) Did you investigate the cause of server panic (e.g. crash dump)? Is it memory related? Cheers Jürgen 2011/11/18 Adrian Zara adrian.z...@aonhewitt.com Hi Chuck, Thanks for the prompt reply. Please refer to the following requested info: Tomcat version: Tomcat: 5.5.31 JVM version: gij (GNU libgcj) version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3) If the JAVA_OPTS affects the shutdown process, then I have to find out what is the best setting for this env variable since I often encounter the server panic during shutdown. What do you think? Both env variables ( JAVA_OPTS and CATALINA_OPTS) are used throughout the catalina.sh file so I cannot remove one and retain the other. Previously, JAVA_OPTS is set to '-Xmx512m -XX:+AggressiveHeap' so I thought increasing the heap size to 1024 will resolve the server panic. I have two tomcat seated on two different machines. When I increased the JVM heap size on the first machine and tried to restart a couple of times, I didn't encounter any server panic. But when I tried on the other machine, even on the first attempt, the server goes to panic. The two machines has the same specs. Both tomcats contain the same web application. Do you think it is really the tomcat settings that causes the server to panic? Should I consider using -server mode in the JAVA_OPTS? Best regards, Adrian Caldarale, Charles R chuck.caldar...@unisys.com 11/18/2011 01:46 PM Please respond to Tomcat Users List users@tomcat.apache.org To Tomcat Users List users@tomcat.apache.org cc Subject RE: Tomcat Causes Server to go Panic/Crash From: Adrian Zara [mailto:adrian.z...@aonhewitt.com] Subject: Tomcat Causes Server to go Panic/Crash Tomcat Version: 5.5.x Exact Tomcat version? There have been at least 15 releases of 5.5. JAVA_OPTS='-Xmx1024m -XX:+AggressiveHeap' Note that setting JAVA_OPTS affects all Tomcat Java executions, including the shutdown process. You should be using CATALINA_OPTS, not JAVA_OPTS. settings in the catalina.sh You should be creating a setenv.sh script to hold environment variable settings, not modifying catalina.sh. Server info: Redhat 3.9.2-6.fc3 CPU: 3.4 GHz Memory: 2GB Exact JVM version? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL
RE: Tomcat Causes Server to go Panic/Crash
On Fri, 18 Nov 2011 16:19:53 +0800, Adrian Zara wrote: I will consider replacing the JVM with the ones you suggested. But for the meantime, while I do not have these better JVM's yet, I'll check of removing the AgressiveHeap option in the JAVA_OPTS as advised by Jürgen. Please do the following: 1. Replace GNU Java with a real one. 2. Use CATALINA_OPTS instead of JAVA_OPTS (so shutdown script won't pick it up). 3. Have you tested server's memory for errors? -- Mikolaj Rydzewski m...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat Causes Server to go Panic/Crash
Hi Miki, Noted with thanks! I'll replace my JVM with a better one. As for the JAVA_OPTS variable, I am planning to revert it back to its original value of 512 and retain it there as I am not confident of removing it from the catalina.sh. As for the server's memory, I'm not sure how to test it. Best regards, Adrian Mikolaj Rydzewski m...@ceti.pl 11/18/2011 04:26 PM Please respond to Tomcat Users List users@tomcat.apache.org To Tomcat Users List users@tomcat.apache.org cc Subject RE: Tomcat Causes Server to go Panic/Crash On Fri, 18 Nov 2011 16:19:53 +0800, Adrian Zara wrote: I will consider replacing the JVM with the ones you suggested. But for the meantime, while I do not have these better JVM's yet, I'll check of removing the AgressiveHeap option in the JAVA_OPTS as advised by Jürgen. Please do the following: 1. Replace GNU Java with a real one. 2. Use CATALINA_OPTS instead of JAVA_OPTS (so shutdown script won't pick it up). 3. Have you tested server's memory for errors? -- Mikolaj Rydzewski m...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited. All messages sent to and from this e-mail address may be monitored as permitted by applicable law and regulations to ensure compliance with our internal policies and to protect our business. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, or contain viruses. You are deemed to have accepted these risks if you communicate with us by e-mail.
Re: Tomcat Causes Server to go Panic/Crash
Adrian, you might want to look into memtest package to check your RAM on startup. BTW: what's the size of your swap space? If there is none, you should consider setting it up (0.5-1 GB will be sufficient). Cheers Jürgen 2011/11/18 Adrian Zara adrian.z...@aonhewitt.com Hi Miki, Noted with thanks! I'll replace my JVM with a better one. As for the JAVA_OPTS variable, I am planning to revert it back to its original value of 512 and retain it there as I am not confident of removing it from the catalina.sh. As for the server's memory, I'm not sure how to test it. Best regards, Adrian Mikolaj Rydzewski m...@ceti.pl 11/18/2011 04:26 PM Please respond to Tomcat Users List users@tomcat.apache.org To Tomcat Users List users@tomcat.apache.org cc Subject RE: Tomcat Causes Server to go Panic/Crash On Fri, 18 Nov 2011 16:19:53 +0800, Adrian Zara wrote: I will consider replacing the JVM with the ones you suggested. But for the meantime, while I do not have these better JVM's yet, I'll check of removing the AgressiveHeap option in the JAVA_OPTS as advised by Jürgen. Please do the following: 1. Replace GNU Java with a real one. 2. Use CATALINA_OPTS instead of JAVA_OPTS (so shutdown script won't pick it up). 3. Have you tested server's memory for errors? -- Mikolaj Rydzewski m...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited. All messages sent to and from this e-mail address may be monitored as permitted by applicable law and regulations to ensure compliance with our internal policies and to protect our business. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, or contain viruses. You are deemed to have accepted these risks if you communicate with us by e-mail.
Re: Tomcat Causes Server to go Panic/Crash
On 18 Nov 2011, at 08:34, Adrian Zara adrian.z...@aonhewitt.com wrote: Hi Miki, Noted with thanks! I'll replace my JVM with a better one. As for the JAVA_OPTS variable, I am planning to revert it back to its original value of 512 and retain it there as I am not confident of removing it from the catalina.sh. Are you not reading what people are telling you? Do NOT use JAVA_OPTS. Use CATALINA_OPTS instead. p As for the server's memory, I'm not sure how to test it. Best regards, Adrian Mikolaj Rydzewski m...@ceti.pl 11/18/2011 04:26 PM Please respond to Tomcat Users List users@tomcat.apache.org To Tomcat Users List users@tomcat.apache.org cc Subject RE: Tomcat Causes Server to go Panic/Crash On Fri, 18 Nov 2011 16:19:53 +0800, Adrian Zara wrote: I will consider replacing the JVM with the ones you suggested. But for the meantime, while I do not have these better JVM's yet, I'll check of removing the AgressiveHeap option in the JAVA_OPTS as advised by Jürgen. Please do the following: 1. Replace GNU Java with a real one. 2. Use CATALINA_OPTS instead of JAVA_OPTS (so shutdown script won't pick it up). 3. Have you tested server's memory for errors? -- Mikolaj Rydzewski m...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited. All messages sent to and from this e-mail address may be monitored as permitted by applicable law and regulations to ensure compliance with our internal policies and to protect our business. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, or contain viruses. You are deemed to have accepted these risks if you communicate with us by e-mail. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Causes Server to go Panic/Crash
Hi Jürgen, Currently, swap space is set to 2GB. By the way, I just learned that the JVM I am using is Java HotSpot (TM) Client VM (build 1.4.2_19-b04, mixed mode) and I believe this should be a good JVM. So I go back again to my drwaing board to analyze the issue. Please advise again. Best regards, Adrian Jürgen Link juergen.l...@googlemail.com 11/18/2011 04:47 PM Please respond to Tomcat Users List users@tomcat.apache.org To Tomcat Users List users@tomcat.apache.org cc Subject Re: Tomcat Causes Server to go Panic/Crash Adrian, you might want to look into memtest package to check your RAM on startup. BTW: what's the size of your swap space? If there is none, you should consider setting it up (0.5-1 GB will be sufficient). Cheers Jürgen 2011/11/18 Adrian Zara adrian.z...@aonhewitt.com Hi Miki, Noted with thanks! I'll replace my JVM with a better one. As for the JAVA_OPTS variable, I am planning to revert it back to its original value of 512 and retain it there as I am not confident of removing it from the catalina.sh. As for the server's memory, I'm not sure how to test it. Best regards, Adrian Mikolaj Rydzewski m...@ceti.pl 11/18/2011 04:26 PM Please respond to Tomcat Users List users@tomcat.apache.org To Tomcat Users List users@tomcat.apache.org cc Subject RE: Tomcat Causes Server to go Panic/Crash On Fri, 18 Nov 2011 16:19:53 +0800, Adrian Zara wrote: I will consider replacing the JVM with the ones you suggested. But for the meantime, while I do not have these better JVM's yet, I'll check of removing the AgressiveHeap option in the JAVA_OPTS as advised by Jürgen. Please do the following: 1. Replace GNU Java with a real one. 2. Use CATALINA_OPTS instead of JAVA_OPTS (so shutdown script won't pick it up). 3. Have you tested server's memory for errors? -- Mikolaj Rydzewski m...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited. All messages sent to and from this e-mail address may be monitored as permitted by applicable law and regulations to ensure compliance with our internal policies and to protect our business. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, or contain viruses. You are deemed to have accepted these risks if you communicate with us by e-mail. The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited. All messages sent to and from this e-mail address may be monitored as permitted by applicable law and regulations to ensure compliance with our internal policies and to protect our business. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, or contain viruses. You are deemed to have accepted these risks if you communicate with us by e-mail.
Re: Tomcat Causes Server to go Panic/Crash
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Adrian, On 11/17/11 10:53 PM, Adrian Zara wrote: I am using Tomcat 5.5.31 and most of the time (one in every two attempts) when I restart the tomcat (during shutdown or when starting up), the server crashes. And the error message is what? Does the JVM crash? Does the webapp crash? Does Tomcat crash? Does the kernel panic? When I see panic, I think kernel. Kindly refer to the following information/specification you may find useful regarding on my inquiry: Tomcat Version: 5.5.31 JAVA_OPTS='-Xmx1024m -XX:+AggressiveHeap' (settings in the catalina.sh) As Chuck points out, you want to use CATALINA_OPTS. Do you really need AggressiveHeap? Server info: Redhat 3.9.2-6.fc3 CPU: 3.4 GHz Memory: 2GB How many CPUs? A quick Google search for AggressiveHeap seems to indicate that a multi-CPU configuration with large amounts of RAM seem to be the scenario under which AggressiveHeap works best. You don't have much RAM. Do you have a 16-way CPU in that tiny box? Please advise whether do we need to change any settings in Tomcat in order to prevent the server panic. You need to provide more information about the failure. JVM version: gij (GNU libgcj) version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3) IIRC, GNU Java is not an appropriate JVM to use for a servlet container. Lots of people have had really bizarre problems over the years running it, and when the switched to the Sun JVM everything got better. You might want to try switching JVMs. Also, since it looks like you are just starting out with a new system, why not upgrade to the latest version of Tomcat? 5.5.31 is fairly outdated at this point. Tomcat 7 is where the action is these days. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk7GdtEACgkQ9CaO5/Lv0PABPgCfWIt1UnD1XH/0EqdpbJsTn6Ac PYsAmQGApepTQOeelfZGzKmxks8vpoT4 =6InO -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Causes Server to go Panic/Crash
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 11/18/11 2:46 AM, Caldarale, Charles R wrote: From: Adrian Zara [mailto:adrian.z...@aonhewitt.com] Subject: Re: Tomcat Causes Server to go Panic/Crash As you can see in the JAVA_OPTS setting, I have set the max heap size to 1G which is 50% of the total physical memory and, if I'm not mistaken, I think we are running only one application in the tomcat so I don't think it's memory related but still not sure. Your problem highly likely is memory related. By setting JAVA_OPTS instead of CATALINA_OPTS you are trying to run both the Tomcat process and the shutdown process with 1 GB heaps each, plus the amount of memory needed for code, stacks, and other data areas of the two processes, plus whatever else is running in the machine. It's worth pointing out that Adrian has set the *max* heap to 1GiB, not the min-and-max, so the shutdown process is very unlikely to actually use that much heap space. So put in a real JVM, set CATALINA_OPTS rather than JAVA_OPTS in setenv.sh, and try again. +1 And upgrade everything. RedHat 3? That's from 2004. Is it RHEL? Well, then you've made it all the way up to 2007. Wow, mailer is Lotus Notes? Sheesh... - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk7GeFgACgkQ9CaO5/Lv0PA6lACgxGVQD6XTTzRKb2BJHWtZJ5rv 9woAn2mgD7TX0HZ9io0gwRu6H8Ied0ET =dXGE -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Causes Server to go Panic/Crash
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Adrian, On 11/18/11 4:29 AM, Adrian Zara wrote: Currently, swap space is set to 2GB. By the way, I just learned that the JVM I am using is Java HotSpot (TM) Client VM (build 1.4.2_19-b04, mixed mode) and I believe this should be a good JVM. So I go back again to my drwaing board to analyze the issue. Please advise again. That JVM should be fine (especially if it was working for you for a long time). It wouldn't be a terrible idea to upgrade, though. I would get Sun 1.6 into testing as soon as you get a chance. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk7GeZkACgkQ9CaO5/Lv0PD0AACeITJWUgZzG17pCp1h2M2oE2KY K1EAn0iY8AMIRSZLh64hdD3bL6h8tdbU =4yWy -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat Causes Server to go Panic/Crash
From: Adrian Zara [mailto:adrian.z...@aonhewitt.com] Subject: Re: Tomcat Causes Server to go Panic/Crash I just learned that the JVM I am using is Java HotSpot (TM) Client VM (build 1.4.2_19-b04, mixed mode) Which hasn't been supported for many years. (1.5 is also not supported, unless you pay Oracle.) You really, really need to upgrade everything. So I go back again to my drwaing board to analyze the issue. Please advise again. Let's repeat: 1) put catalina.sh back to its original form, as distributed by Tomcat 2) set CATALINA_OPTS in setenv.sh for a reasonable heap size - 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat Causes Server to go Panic/Crash
Hi, Good morning! I am using Tomcat 5.5.x and most of the time (one in every two attempts) when I restart the tomcat (during shutdown or when starting up), the server crashes. Kindly refer to the following information/specification you may find useful regarding on my inquiry: Tomcat Version: 5.5.x JAVA_OPTS='-Xmx1024m -XX:+AggressiveHeap' (settings in the catalina.sh) Server info: Redhat 3.9.2-6.fc3 CPU: 3.4 GHz Memory: 2GB Following is the steps when I restart the Tomcat: (current directory is in tomcat folder) 1. ./bin/shutdown.sh 2. ./bin/startup.sh If upon shutdown and there are still java processes running, we manually kill the java processes then execute the startup.sh Please advise whether do we need to change any settings in Tomcat in order to prevent the server panic. Thank you in advance. Best regards, Adrian The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited. All messages sent to and from this e-mail address may be monitored as permitted by applicable law and regulations to ensure compliance with our internal policies and to protect our business. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, or contain viruses. You are deemed to have accepted these risks if you communicate with us by e-mail.
RE: Tomcat Causes Server to go Panic/Crash
From: Adrian Zara [mailto:adrian.z...@aonhewitt.com] Subject: Tomcat Causes Server to go Panic/Crash Tomcat Version: 5.5.x Exact Tomcat version? There have been at least 15 releases of 5.5. JAVA_OPTS='-Xmx1024m -XX:+AggressiveHeap' Note that setting JAVA_OPTS affects all Tomcat Java executions, including the shutdown process. You should be using CATALINA_OPTS, not JAVA_OPTS. settings in the catalina.sh You should be creating a setenv.sh script to hold environment variable settings, not modifying catalina.sh. Server info: Redhat 3.9.2-6.fc3 CPU: 3.4 GHz Memory: 2GB Exact JVM version? - 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat Causes Server to go Panic/Crash
Hi Chuck, Thanks for the prompt reply. Please refer to the following requested info: Tomcat version: Tomcat: 5.5.31 JVM version: gij (GNU libgcj) version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3) If the JAVA_OPTS affects the shutdown process, then I have to find out what is the best setting for this env variable since I often encounter the server panic during shutdown. What do you think? Both env variables ( JAVA_OPTS and CATALINA_OPTS) are used throughout the catalina.sh file so I cannot remove one and retain the other. Previously, JAVA_OPTS is set to '-Xmx512m -XX:+AggressiveHeap' so I thought increasing the heap size to 1024 will resolve the server panic. I have two tomcat seated on two different machines. When I increased the JVM heap size on the first machine and tried to restart a couple of times, I didn't encounter any server panic. But when I tried on the other machine, even on the first attempt, the server goes to panic. The two machines has the same specs. Both tomcats contain the same web application. Do you think it is really the tomcat settings that causes the server to panic? Should I consider using -server mode in the JAVA_OPTS? Best regards, Adrian Caldarale, Charles R chuck.caldar...@unisys.com 11/18/2011 01:46 PM Please respond to Tomcat Users List users@tomcat.apache.org To Tomcat Users List users@tomcat.apache.org cc Subject RE: Tomcat Causes Server to go Panic/Crash From: Adrian Zara [mailto:adrian.z...@aonhewitt.com] Subject: Tomcat Causes Server to go Panic/Crash Tomcat Version: 5.5.x Exact Tomcat version? There have been at least 15 releases of 5.5. JAVA_OPTS='-Xmx1024m -XX:+AggressiveHeap' Note that setting JAVA_OPTS affects all Tomcat Java executions, including the shutdown process. You should be using CATALINA_OPTS, not JAVA_OPTS. settings in the catalina.sh You should be creating a setenv.sh script to hold environment variable settings, not modifying catalina.sh. Server info: Redhat 3.9.2-6.fc3 CPU: 3.4 GHz Memory: 2GB Exact JVM version? - 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited. All messages sent to and from this e-mail address may be monitored as permitted by applicable law and regulations to ensure compliance with our internal policies and to protect our business. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, or contain viruses. You are deemed to have accepted these risks if you communicate with us by e-mail.
Re: Tomcat Causes Server to go Panic/Crash
Hi Adrian, you might want to replace the AggressiceHeap option by a decent initial heap size, e.g. Xms=64m. AggressiveHeap seems to eat up all available memory: [...] The size of the initial heap is calculated based on the size of the physical memory and attempts to make maximal use of the physical memory for the heap (i.e., the algorithms attempt to use heaps nearly as large as the total physical memory). (see http://java.sun.com/docs/hotspot/gc1.4.2/#4.2.2.%20AggressiveHeap%7Coutline) Did you investigate the cause of server panic (e.g. crash dump)? Is it memory related? Cheers Jürgen 2011/11/18 Adrian Zara adrian.z...@aonhewitt.com Hi Chuck, Thanks for the prompt reply. Please refer to the following requested info: Tomcat version: Tomcat: 5.5.31 JVM version: gij (GNU libgcj) version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3) If the JAVA_OPTS affects the shutdown process, then I have to find out what is the best setting for this env variable since I often encounter the server panic during shutdown. What do you think? Both env variables ( JAVA_OPTS and CATALINA_OPTS) are used throughout the catalina.sh file so I cannot remove one and retain the other. Previously, JAVA_OPTS is set to '-Xmx512m -XX:+AggressiveHeap' so I thought increasing the heap size to 1024 will resolve the server panic. I have two tomcat seated on two different machines. When I increased the JVM heap size on the first machine and tried to restart a couple of times, I didn't encounter any server panic. But when I tried on the other machine, even on the first attempt, the server goes to panic. The two machines has the same specs. Both tomcats contain the same web application. Do you think it is really the tomcat settings that causes the server to panic? Should I consider using -server mode in the JAVA_OPTS? Best regards, Adrian Caldarale, Charles R chuck.caldar...@unisys.com 11/18/2011 01:46 PM Please respond to Tomcat Users List users@tomcat.apache.org To Tomcat Users List users@tomcat.apache.org cc Subject RE: Tomcat Causes Server to go Panic/Crash From: Adrian Zara [mailto:adrian.z...@aonhewitt.com] Subject: Tomcat Causes Server to go Panic/Crash Tomcat Version: 5.5.x Exact Tomcat version? There have been at least 15 releases of 5.5. JAVA_OPTS='-Xmx1024m -XX:+AggressiveHeap' Note that setting JAVA_OPTS affects all Tomcat Java executions, including the shutdown process. You should be using CATALINA_OPTS, not JAVA_OPTS. settings in the catalina.sh You should be creating a setenv.sh script to hold environment variable settings, not modifying catalina.sh. Server info: Redhat 3.9.2-6.fc3 CPU: 3.4 GHz Memory: 2GB Exact JVM version? - 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited. All messages sent to and from this e-mail address may be monitored as permitted by applicable law and regulations to ensure compliance with our internal policies and to protect our business. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, or contain viruses. You are deemed to have accepted these risks if you communicate with us by e-mail.
Re: Tomcat Causes Server to go Panic/Crash
Hi Jürgen, Thanks for the info. Honestly, I don't know whether it's due to memory outage. But something is happening during the shutdown process. As you can see in the JAVA_OPTS setting, I have set the max heap size to 1G which is 50% of the total ph ysical memory and, if I'm not mistaken, I think we are running only one application in the tomcat so I don't think it's memory related but still not sure. The weird thing is instead that only the tomcat is supposed to crash, the whole server does. If I set the AgressiveHeap option is there still a possibility to eat up all the availble memory even if I set the max heap size? Best regards, Adrian Jürgen Link juergen.l...@googlemail.com 11/18/2011 02:59 PM Please respond to Tomcat Users List users@tomcat.apache.org To Tomcat Users List users@tomcat.apache.org cc Subject Re: Tomcat Causes Server to go Panic/Crash Hi Adrian, you might want to replace the AggressiceHeap option by a decent initial heap size, e.g. Xms=64m. AggressiveHeap seems to eat up all available memory: [...] The size of the initial heap is calculated based on the size of the physical memory and attempts to make maximal use of the physical memory for the heap (i.e., the algorithms attempt to use heaps nearly as large as the total physical memory). (see http://java.sun.com/docs/hotspot/gc1.4.2/#4.2.2.%20AggressiveHeap%7Coutline ) Did you investigate the cause of server panic (e.g. crash dump)? Is it memory related? Cheers Jürgen 2011/11/18 Adrian Zara adrian.z...@aonhewitt.com Hi Chuck, Thanks for the prompt reply. Please refer to the following requested info: Tomcat version: Tomcat: 5.5.31 JVM version: gij (GNU libgcj) version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3) If the JAVA_OPTS affects the shutdown process, then I have to find out what is the best setting for this env variable since I often encounter the server panic during shutdown. What do you think? Both env variables ( JAVA_OPTS and CATALINA_OPTS) are used throughout the catalina.sh file so I cannot remove one and retain the other. Previously, JAVA_OPTS is set to '-Xmx512m -XX:+AggressiveHeap' so I thought increasing the heap size to 1024 will resolve the server panic. I have two tomcat seated on two different machines. When I increased the JVM heap size on the first machine and tried to restart a couple of times, I didn't encounter any server panic. But when I tried on the other machine, even on the first attempt, the server goes to panic. The two machines has the same specs. Both tomcats contain the same web application. Do you think it is really the tomcat settings that causes the server to panic? Should I consider using -server mode in the JAVA_OPTS? Best regards, Adrian Caldarale, Charles R chuck.caldar...@unisys.com 11/18/2011 01:46 PM Please respond to Tomcat Users List users@tomcat.apache.org To Tomcat Users List users@tomcat.apache.org cc Subject RE: Tomcat Causes Server to go Panic/Crash From: Adrian Zara [mailto:adrian.z...@aonhewitt.com] Subject: Tomcat Causes Server to go Panic/Crash Tomcat Version: 5.5.x Exact Tomcat version? There have been at least 15 releases of 5.5. JAVA_OPTS='-Xmx1024m -XX:+AggressiveHeap' Note that setting JAVA_OPTS affects all Tomcat Java executions, including the shutdown process. You should be using CATALINA_OPTS, not JAVA_OPTS. settings in the catalina.sh You should be creating a setenv.sh script to hold environment variable settings, not modifying catalina.sh. Server info: Redhat 3.9.2-6.fc3 CPU: 3.4 GHz Memory: 2GB Exact JVM version? - 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited. All messages sent to and from this e-mail address may be monitored as permitted by applicable law and regulations to ensure compliance with our internal policies and to protect our business. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, or contain viruses. You
RE: Tomcat Causes Server to go Panic/Crash
From: Adrian Zara [mailto:adrian.z...@aonhewitt.com] Subject: RE: Tomcat Causes Server to go Panic/Crash Tomcat version: Tomcat: 5.5.31 Good to know. Be aware that 5.5 is reaching end of life soon, and you should move up to something current. JVM version: gij (GNU libgcj) version 3.4.2 20041017 Stop right there: the GNU Java implementation is pretty much worthless for running anything but minimal Java programs. Remove it and install a real JVM, such as Oracle or OpenJDK. If the JAVA_OPTS affects the shutdown process, then I have to find out what is the best setting for this env variable You're missing the point: don't use JAVA_OPTS, use CATALINA_OPTS, and put the variable in setenv.sh. Do not modify catalina.sh or startup.sh. Should I consider using -server mode in the JAVA_OPTS? Server mode will produce more efficient code at the expense of longer startup times and slower compilations of JSPs. It is unlikely to have any significant effect on heap usage. - 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat Causes Server to go Panic/Crash
From: Adrian Zara [mailto:adrian.z...@aonhewitt.com] Subject: Re: Tomcat Causes Server to go Panic/Crash As you can see in the JAVA_OPTS setting, I have set the max heap size to 1G which is 50% of the total physical memory and, if I'm not mistaken, I think we are running only one application in the tomcat so I don't think it's memory related but still not sure. Your problem highly likely is memory related. By setting JAVA_OPTS instead of CATALINA_OPTS you are trying to run both the Tomcat process and the shutdown process with 1 GB heaps each, plus the amount of memory needed for code, stacks, and other data areas of the two processes, plus whatever else is running in the machine. So put in a real JVM, set CATALINA_OPTS rather than JAVA_OPTS in setenv.sh, and try again. - 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Causes Server to go Panic/Crash
Hi Adrian, specifying 1G heap size does not limit your process's mem consumption to 1G, there's much more inside a JVM than heap! If I got you right, your physical mem is 2G, right? Well, having two processes (running tomcat instance + tomcat shutdown process, which is a new JVM instance) with 1G heap each will hit your system badly, for sure. Try to remove AggressiveHeap option, I don't think it is of much help to you. Consider specifying the initial heap size with 128M or so, this will keep at least the shutdown process at a decent size. Cheers Jürgen 2011/11/18 Adrian Zara adrian.z...@aonhewitt.com Hi Jürgen, Thanks for the info. Honestly, I don't know whether it's due to memory outage. But something is happening during the shutdown process. As you can see in the JAVA_OPTS setting, I have set the max heap size to 1G which is 50% of the total ph ysical memory and, if I'm not mistaken, I think we are running only one application in the tomcat so I don't think it's memory related but still not sure. The weird thing is instead that only the tomcat is supposed to crash, the whole server does. If I set the AgressiveHeap option is there still a possibility to eat up all the availble memory even if I set the max heap size? Best regards, Adrian Jürgen Link juergen.l...@googlemail.com 11/18/2011 02:59 PM Please respond to Tomcat Users List users@tomcat.apache.org To Tomcat Users List users@tomcat.apache.org cc Subject Re: Tomcat Causes Server to go Panic/Crash Hi Adrian, you might want to replace the AggressiceHeap option by a decent initial heap size, e.g. Xms=64m. AggressiveHeap seems to eat up all available memory: [...] The size of the initial heap is calculated based on the size of the physical memory and attempts to make maximal use of the physical memory for the heap (i.e., the algorithms attempt to use heaps nearly as large as the total physical memory). (see http://java.sun.com/docs/hotspot/gc1.4.2/#4.2.2.%20AggressiveHeap%7Coutline ) Did you investigate the cause of server panic (e.g. crash dump)? Is it memory related? Cheers Jürgen 2011/11/18 Adrian Zara adrian.z...@aonhewitt.com Hi Chuck, Thanks for the prompt reply. Please refer to the following requested info: Tomcat version: Tomcat: 5.5.31 JVM version: gij (GNU libgcj) version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3) If the JAVA_OPTS affects the shutdown process, then I have to find out what is the best setting for this env variable since I often encounter the server panic during shutdown. What do you think? Both env variables ( JAVA_OPTS and CATALINA_OPTS) are used throughout the catalina.sh file so I cannot remove one and retain the other. Previously, JAVA_OPTS is set to '-Xmx512m -XX:+AggressiveHeap' so I thought increasing the heap size to 1024 will resolve the server panic. I have two tomcat seated on two different machines. When I increased the JVM heap size on the first machine and tried to restart a couple of times, I didn't encounter any server panic. But when I tried on the other machine, even on the first attempt, the server goes to panic. The two machines has the same specs. Both tomcats contain the same web application. Do you think it is really the tomcat settings that causes the server to panic? Should I consider using -server mode in the JAVA_OPTS? Best regards, Adrian Caldarale, Charles R chuck.caldar...@unisys.com 11/18/2011 01:46 PM Please respond to Tomcat Users List users@tomcat.apache.org To Tomcat Users List users@tomcat.apache.org cc Subject RE: Tomcat Causes Server to go Panic/Crash From: Adrian Zara [mailto:adrian.z...@aonhewitt.com] Subject: Tomcat Causes Server to go Panic/Crash Tomcat Version: 5.5.x Exact Tomcat version? There have been at least 15 releases of 5.5. JAVA_OPTS='-Xmx1024m -XX:+AggressiveHeap' Note that setting JAVA_OPTS affects all Tomcat Java executions, including the shutdown process. You should be using CATALINA_OPTS, not JAVA_OPTS. settings in the catalina.sh You should be creating a setenv.sh script to hold environment variable settings, not modifying catalina.sh. Server info: Redhat 3.9.2-6.fc3 CPU: 3.4 GHz Memory: 2GB Exact JVM version? - 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from