|
From: Marsh, R. <ral...@th...> - 2005-03-04 00:19:31
|
We are running a Struts web app on Tomcat 4.1. We use the wrapper to run =
Tomcat as a service.
Over the past 8 months, about once per month, the service has died. =
Within the past month the frequency of these events has gone up to about =
once per week.=20
This leaves the web app dead in the water, the user receiving HTTP 500 =
errors and us logging into the NT box and manually restarting the =
service. We have the wrapper.conf file set to output STATUS level =
messages to the log. In the log we see this:
ERROR | wrapper | 2005/03/03 17:58:43 | JVM appears hung: Timed out =
waiting for signal from JVM.
ERROR | wrapper | 2005/03/03 17:58:43 | Java Virtual Machine did not =
exit on request, terminated
STATUS | wrapper | 2005/03/03 17:58:49 | Launching a JVM...
STATUS | wrapper | 2005/03/03 17:59:03 | <-- Wrapper Stopped
I have four questions:
1) what can cause a JVM backing Tomcat to hang?
2) how should I configure the wrapper to get the most useful logging =
information during these events? Running in DEBUG for a week/weeks will =
produce copious logs. If necessary, I'll do it, but is it necessary?
3) isn't the wrapper supposed to recognize these hangs, gracefully kill =
the process then restart a new process? If so, what should I look at to =
determine why this is not happening in our case
4) in the log output above what is going on between the third and forth =
entry? It appears a new JVM is launching then the wrapper stops =
everything. Why?
Our complete wrapper.conf file is included below. Thank you.
Ralph Marsh
#********************************************************************
# Wrapper Properties
#********************************************************************
# Java Application
wrapper.java.command=3D%java_home%\bin\java
# Java Main class. This class must implement the WrapperListener =
interface
# or guarantee that the WrapperManager class is initialized. Helper
# classes are provided to do this for you. See the Integration section
# of the documentation for details.
wrapper.java.mainclass=3Dorg.tanukisoftware.wrapper.WrapperStartStopApp
# Java Classpath (include wrapper.jar) Add class path elements as
# needed starting from 1
wrapper.java.classpath.1=3D../common/lib/wrapper.jar
wrapper.java.classpath.2=3D%java_home%/lib/tools.jar
wrapper.java.classpath.3=3D../bin/bootstrap.jar
# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=3D../common/lib
# Java Additional Parameters
wrapper.java.additional.1=3D-server
wrapper.java.additional.2=3D-XX:+UseParNewGC
wrapper.java.additional.3=3D-XX:MaxNewSize=3D24m
wrapper.java.additional.4=3D-XX:NewSize=3D24m
wrapper.java.additional.5=3D-XX:SurvivorRatio=3D128
wrapper.java.additional.6=3D-XX:+UseConcMarkSweepGC
wrapper.java.additional.7=3D-XX:MaxTenuringThreshold=3D0
wrapper.java.additional.8=3D-XX:CMSInitiatingOccupancyFraction=3D60
wrapper.java.additional.9=3D-Djava.endorsed.dirs=3D../bin;../common/endor=
sed
wrapper.java.additional.10=3D-Dcatalina.base=3D..
wrapper.java.additional.11=3D-Dcatalina.home=3D..
wrapper.java.additional.12=3D-Djava.io.tmpdir=3D../temp
=20
#wrapper.java.additional.13=3D-verbosegc
#wrapper.java.additional.14=3D-XX:+PrintGCTimeStamps
#wrapper.java.additional.15=3D-XX:+PrintGCDetails
#wrapper.java.additional.13=3D-XX:+PrintTenuringDistribution
#wrapper.java.additional.7=3D-verbosegc
# Initial Java Heap Size (in MB)
wrapper.java.initmemory=3D1200
# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=3D1200
# Application parameters. Add parameters as needed starting from 1
# The first application parameter is the name of the class whose main
# method is to be called when the application is launched. The class
# name is followed by the number of parameters to be passed to its main
# method. Then comes the actual parameters.
wrapper.app.parameter.1=3Dorg.apache.catalina.startup.Bootstrap
wrapper.app.parameter.2=3D1
wrapper.app.parameter.3=3Dstart
# The start parameters are followed by the name of the class whose main
# method is to be called to stop the application. The stop class name
# is followed by a flag which controls whether or not the Wrapper should
# wait for all non daemon threads to complete before exiting the JVM.
# The flag is followed by the number of parameters to be passed to the
# stop class's main method. Finally comes the actual parameters.
wrapper.app.parameter.4=3Dorg.apache.catalina.startup.Bootstrap
wrapper.app.parameter.5=3Dtrue
wrapper.app.parameter.6=3D1
wrapper.app.parameter.7=3Dstop
#********************************************************************
# Wrapper Logging Properties
#********************************************************************
# Format of output for the console. (See docs for formats)
wrapper.console.format=3DPM
# Log Level for console output. (See docs for log levels)
wrapper.console.loglevel=3DINFO
# Log file to use for wrapper output logging.
wrapper.logfile=3D../logs/wrapper.log
# Format of output for the log file. (See docs for formats)
wrapper.logfile.format=3DLPTM
# Log Level for log file output. (See docs for log levels)
wrapper.logfile.loglevel=3DSTATUS
# Maximum size that the log file will be allowed to grow to before
# the log is rolled. Size is specified in bytes. The default value
# of 0, disables log rolling. May abbreviate with the 'k' (kb) or
# 'm' (mb) suffix. For example: 10m =3D 10 megabytes.
wrapper.logfile.maxsize=3D500k
# Maximum number of rolled log files which will be allowed before old
# files are deleted. The default value of 0 implies no limit.
wrapper.logfile.maxfiles=3D0
# Log Level for sys/event log output. (See docs for log levels)
wrapper.syslog.loglevel=3DNONE
#********************************************************************
# Wrapper NT Service Properties
#********************************************************************
# WARNING - Do not modify any of these properties when an application
# using this configuration file has been installed as a service.
# Please uninstall the service before modifying this section. The
# service can then be reinstalled.
# Name of the service
wrapper.ntservice.name=3Dtomcat-rights2a
# Display name of the service
wrapper.ntservice.displayname=3Dtomcat-rights2a
# Description of the service
wrapper.ntservice.description=3Dtomcat-rights2a
# Service dependencies. Add dependencies as needed starting from 1
wrapper.ntservice.dependency.1=3D
# Mode in which the service is installed. AUTO_START or DEMAND_START
wrapper.ntservice.starttype=3DAUTO_START
# Allow the service to interact with the desktop.
wrapper.ntservice.interactive=3Dfalse
|