Hi, There is a correction as JAVA_OPTS variable is defined in catalina.sh under $CATALINA_HOME/bin and we use $CATALINA_HOME/bin/startup.sh to start tomcat. $CATALINA_HOME/bin/startup.sh has the code like below ,
---------------------------------------------------------------------------------------------------------------------------------------------- PRGDIR=`dirname "$PRG"` EXECUTABLE=catalina.sh # Check that target executable exists if $os400; then # -x will Only work on the os400 if the files are: # 1. owned by the user # 2. owned by the PRIMARY group of the user # this will not work if the user belongs in secondary groups eval else if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then echo "Cannot find $PRGDIR/$EXECUTABLE" echo "The file is absent or does not have execute permission" echo "This file is needed to run this program" exit 1 fi fi ---------------------------------------------------------------------------------------------------------------------------------------------- I had changed catalina.sh in our development environment like a week back and want to implement it in the production environment but I got this doubt. I feel catalina.sh is invoked by startup.sh but am not sure. I have already taken downtime for production tomorrow but I got this doubt whether changing the JAVA_OPTS="$JAVA_OPTS -Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Dcwom.bl.ip=127.0.0.1 -Dcwom.bl.port=1399" to JAVA_OPTS="$JAVA_OPTS -Xms2048m -Xmx2048m -XX:MaxPermSize=512m -Dcwom.bl.ip=127.0.0.1 -Dcwom.bl.port=1399" in catalina.sh would have the affect of increasing the heap & Permgen memory in Tomcat. I hope my query is clear as am quite anxious as I have a downtime scheduled tomorrow. Requesting a reply on priority. On Mon, May 5, 2014 at 3:37 PM, Randhir Singh <randhir.si...@sterlite.com>wrote: > Thanks Chris for your answer. > > I researched a lot and want to try out an option for OOME: > > The JAVA_OPTS variable in $CATALINA_HOME/bin/startup.sh has the value as: > > JAVA_OPTS="$JAVA_OPTS -Xms1303m -Xmx1303m -XX:MaxPermSize=256m > -Dcwom.bl.ip=127.0.0.1 > -Dcwom.bl.port=1399" > > I checked for free space on the VM instance with Red Hat Linux as the OS on > which the Tomcat is hosted with a total memory of 19 GB, I found that there > is around 8 GB of free space in the server. > > I am planning to increase the memory allocation for Heap size and PermGen > size to almost double as below: > > JAVA_OPTS="$JAVA_OPTS -Xms2048m -Xmx2048m -XX:MaxPermSize=512m > -Dcwom.bl.ip=127.0.0.1 > -Dcwom.bl.port=1399" > > I hope, this should avoid the hang-up issues where Tomcat does not seem to > respond. I plan to implement this in the UAT environment at first and see > how it goes. > > There is another thing I wanted to try. We have RHEL 5.8 Beta (Tikanga) > version and lot of updates from Red Hat are pending which can update the > version to RHEL 5.10 (Tikanga). Would this patching help as lot of updates > are pending? > > Regards > > -----Original Message----- > From: Christopher Schultz [mailto:ch...@christopherschultz.net] > Sent: Monday, April 28, 2014 6:46 PM > To: Tomcat Users List > Subject: Re: How to monitor performance of tomcat > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Randir, > > On 4/28/14, 6:46 AM, Randhir Singh wrote: > > Thanks for your valuable inputs. I am a bit of a novice to this. > > When this problem happens, it is quite a loss of face in front of the > > users who are widely spread geographically. I checked the catalina.out > > logs on the 2 days that the problem happened on 23rd & 25th April, the > > findings are as below: > > > > 23rd April '14: > > > > The catalina.out log showed the message like, > > ---------------------------------------------------------------------- > > ---------------------------------------------------------------------- > > ----------- > > > > > Caused by: org.jboss.remoting.InvocationFailureException: Socket timed out. > > Waited 300000 milliseconds for response while calling on > > InvokerLocator [socket://<hostname of our > > machine>:4173/?invokerDestructionDelay=5000&timeout=300000]; > > nested exception is: java.net.SocketTimeoutException: Read timed out > > ---------------------------------------------------------------------- > > ---------------------------------------------------------------------- > > ----------- > > > > 3 times among other exceptions in a span of around 2 minutes. > > > > 25th April '14: > > > > The errors captured in the logs were like, > > ---------------------------------------------------------------------- > > ---------------------------------------------------------------------- > > ----------- > > > > > java.lang.OutOfMemoryError: GC overhead limit exceeded > > ---------------------------------------------------------------------- > > ---------------------------------------------------------------------- > > ----------- > > > > 4 times among other exceptions in a span of around 2 minutes. > > > > Requesting a reply on this. > > It sounds like you have all kinds of problems: > > 1. Bad performance under unspecified conditions 2. Application hang under > unspecified conditions 3. catalina.out file grows quickly, may fill > filesystem 4. Long timeouts on the server-side during some unspecified > operation (I don't know what an InvokerLocator is) 5. OOME > > It seems to me that you should focus on one of these problems (probably the > OOME) and get that fixed, first. You may find it is the root of all other > problems. > > This community can only help you so much with so little information. > You may have to hire someone to help you through this process. > > - -chris > > > -----Original Message----- From: Jeffrey Janner > > [mailto:jeffrey.jan...@polydyne.com] Sent: Monday, April 21, 2014 > > 7:26 PM To: 'Tomcat Users List' Subject: RE: How to monitor > > performance of tomcat > > > >> -----Original Message----- From: Randhir Singh > >> [mailto:randhir.si...@sterlite.com] Sent: Monday, April 21, 2014 > >> 5:17 AM To: Tomcat Users List Subject: RE: How to monitor performance > >> of tomcat > >> > >> Hi, > >> > >> I wanted input from the experts on my query below that the port > >> 8891 does not respond when the command, > >> > >> jconsole 10.101.17.79:8891 > >> > >> is issued when the application hangs and stops responding. > >> > >> Requesting inputs so that the root cause analysis of this issue can > >> be found out. > >> > >> Regards > >> > > Randhir - Your actual first request in this thread was apparently a > > request for opinions on monitoring tools. This problem of actual hangs > > wasn't brought up until a week later. Here is what I've usually found > > when Tomcat stops responding and even the monitoring port is > > unreachable via jconsole and other tools: Your JVM has crashed for > > some reason. At this point, you need to refer to the Tomcat logs, your > > application logs, etc. in order to find the root cause. If the JVM is > > still "running", try taking a couple of thread dumps and review them > > to find your root cause. Jeff > > > > ---------------------------------------------- T ususcib, -mil > > uer-ususcib@tmct.paheor oraditonl omans,e-ai: ses-el@tmct.paheor > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1 > Comment: GPGTools - http://gpgtools.org > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQIcBAEBCAAGBQJTXlSFAAoJEBzwKT+lPKRYk9oQAMVDfgM7PhvjhnfnIoYLna8l > ksJ7NjGrACwGjyDBU/RJe9Vk/8FjvVEhX3D5pEfm+LyOEvNxeB7uJNhmRT0gQKjV > U0OcFQyuyjL6RrYP7yK5hmzzqTBM8gNpHzqehDt+0ZmPC8gDOSlARSLvjk7POur2 > gghqrGT0xxx+vPtQMNvL3KENDd/Fv964UpoK3nTtwdLHwJLaVmQd9lUUaY/3SmzH > tKlnE2CEXAdHVjtD5nV4MC4W+SkcCyNlBZTxO4xNrW11nWIahhwZLqnallfwVXYN > 2tFhkpTHesy5KkTMDXG+R5uCywWSW/ioRd75qFLbMdRChBIDV8pN5DAhvDaB4Azp > UYgLr1XkT0PSD7PQd8xl6INrg7/Y+Urtn0CFYUlbpToHJQiNtkwxzpRtG/ciF7Mh > RTsiVtYrky8M+UMloHs6M/oNeO3i02AlmPjzoSxaURfOriQvzCLvndp013IqALo4 > Nhc9ycZ8gGBMOBPXTDstqY8jahBI0wAmJjI39G2l/ySKHN5xSCdpRCrI93YLUWYU > lKJBYp5iCkue926vHJT5hthgTdBJg90jVO2glgZp3qNsnEnqlabe46XUaN+wTq5s > 2vhKhX800poZ0zRgPlz/TyDGmkzN7JLuz+0Lpig4tD/5hQfXxTt7nmfKP1dEgTZs > J5sPHZzmedctIwZNpXB/ > =Lgqk > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > -- *STL Disclaimer:* The content of this message may be legally privileged and confidential and are for the use of the intended recipient(s) only. It should not be read, copied and used by anyone other than the intended recipient(s). If you have received this message in error, please immediately notify the sender, preserve its confidentiality and delete it. Before opening any attachments please check them for viruses and defects. No employee or agent is authorised to conclude any binding agreement on behalf of Sterlite Technologies Limited with another party by email without express written confirmation by authorised person. Visit us at www.sterlitetechnologies.com Please consider environment before printing this email !