|
From: Leif M. <le...@ta...> - 2008-05-21 00:58:02
|
Sushil, Ok. Yes you can not have more than one application piping to the same log file. This should be the same for most applications as they each open the log file for appending. When this happens, each file handle keeps track of where it thinks the end of the file is and writes to it. The wrapper is doing a read lock but if the file has been inactive for more than a couple seconds it allows the file to be closed. If you want to put everything into the same log file, I would suggest configuring log4j to output to the console and then let the Wrapper handle logging everything to the wrapper.log file. This is how I usally create applications. Looking at the log file that you sent, it looks like the Java process is being starved of CPU for some reason and is not responding to the ping requests. Under normal situations, this should not happen. Here are some causes I can think of. 1) The system does not have enough available physical memory to store the entire JVM without disk swapping. 2) You may have set the thread priority to a very high value for the thread doing the processing. 3) Another process has its priority set to a high value so that it is allowed to consume all available CPU. In either case, an easy fix should be to extend the ping timeout as you mentioned. If none of the above are true, especially 1, then this should not be necessary. Try this: wrapper.ping.timeout=300 Be aware that this new timeout will be the fastest that the Wrapper will be able to decide that your application has actually frozen and then restart it. We recommend keeping this timeout as short as possible while being long enough to avoid restarts. Please let me know the results. Cheers, Leif On Wed, May 21, 2008 at 1:36 AM, Sushil Dodake <sus...@gm...> wrote: > Leif, > Actually as i mentioed below i am using log4j for logging so my conf folder > has following files > 1. application.properties > 2. DataSource.xml > 3. log4j.properties > 4. <application name>.conf > > and i have pointed logging of wrapper (defined in the .conf file) and > application (defined in the log4j.properties file) to same file. > but i could find that in that case the wrapper logging is not done correctly > as it cant captuer the logs of why and how wrapper is restarted. which is > very confusing to me. > so i just bifurcated the Wrapper logging and Log4j logging to 2 diffrent > files (although the log messages are almost similar except the wrapper > loging showed th reason of restart) and found that the JVM is restarted as > there is no response. > I brisk through google and could find out that the wrapper is not able to > get any response from JVM and hence it starts new JVM instance. > as in my .conf file i have not set any of the following properties > wrapper.ping.timeout > wrapper.cpu.timeout > Wrapper is using the default 30 secs for wrapper.ping.timeout property. > > do you think i shall change the wrapper.ping.timeout value to 5 min and then > try or is there any other solution to this problem? > > <snip> > RD</AddressLine2><AddressLine3>NOTRANS</AddressLine3><AddressLine4>NOTRANS</AddressLine4><City>BALLWIN</City><StateorProvince>MO</StateorProvince><Country>NOCD</Country><PostalCode>63011</PostalCode><Telephone1>(636)227-8580</Telephone1></Address></Addresses></SoldToParty><ShipToParty><PartyId><Id>1</Id></PartyId><Name > lang="EN-US">CITY OF BALLWIN G C</" > DEBUG | wrapperp | 2008/05/20 06:47:41 | send a packet PING : ping > DEBUG | wrapperp | 2008/05/20 06:47:45 | send a packet PING : ping > DEBUG | wrapperp | 2008/05/20 06:47:49 | send a packet PING : ping > DEBUG | wrapperp | 2008/05/20 06:47:54 | send a packet PING : ping > DEBUG | wrapperp | 2008/05/20 06:47:58 | send a packet PING : ping > DEBUG | wrapperp | 2008/05/20 06:48:02 | send a packet PING : ping > DEBUG | wrapperp | 2008/05/20 06:48:06 | send a packet PING : ping > DEBUG | wrapperp | 2008/05/20 06:48:10 | send a packet PING : ping > ERROR | wrapper | 2008/05/20 06:48:12 | JVM appears hung: Timed out > waiting for signal from JVM. > ERROR | wrapper | 2008/05/20 06:48:12 | JVM did not exit on request, > terminated > DEBUG | wrapperp | 2008/05/20 06:48:12 | server listening on port 32000. > DEBUG | wrapper | 2008/05/20 06:48:13 | Waiting 5 seconds before launching > another JVM. > STATUS | wrapper | 2008/05/20 06:48:17 | Launching a JVM... > DEBUG | wrapper | 2008/05/20 06:48:17 | command: "C:\Program > Files\Java\jdk1.6.0_05\bin\java.exe" -Xms768m -Xmx1024m > -Djava.library.path="../lib" -classpath > "../lib/wrapper.jar;../lib/.;../lib/..;../lib/antlr-2.7.6.jar;../lib/asm-attrs.jar;../lib/asm.jar;../lib/axiom-api-1.2.5.jar;../lib/axiom-dom-1.2.5.jar;../lib/axiom-impl-1.2.5.jar;../lib/axis2-kernel-1.3.jar;../lib/axis2-spring-1.3.jar;../lib/castor-1.1.2.1-xml.jar;../lib/cglib-2.1.3.jar;../lib/commons-codec-1.3.jar;../lib/commons-collections-2.1.1.jar;../lib/commons-dbcp-1.2.1.jar;../lib/commons-httpclient-3.0.1.jar;../lib/commons-logging-1.1.jar;../lib/dom4j-1.6.1.jar;../lib/hibernate3.jar;../lib/jmock-1.1.0RC1.jar;../lib/jta.jar;../lib/junit.jar;../lib/log4j-1.2.13.jar;../lib/oracle_jdbc.jar;../lib/quartz.jar;../lib/RebateAutomation_v1_0.jar;../lib/spring.jar;../lib/stax-api-1.0.1.jar;../lib/wrapper.dll;../lib/wrapper.jar;../lib/wrappertest.jar;../lib/wsdl4j-1.6.2.jar;../lib/wstx-asl-3.2.1.jar;../lib/xerces-2.4.0.jar;../lib/xercesImpl-2.8.1.jar;../lib/xml-apis-1.3.03.jar;../lib/XmlSchema-1.3.2.jar;../conf/.;../conf/..;../conf/application.properties;../conf/DataSource.xml;../conf/log4j.properties;../conf/RebateAutomation.conf" > -Dwrapper.key="vpyFZDCX8I7aEkfa" -Dwrapper.port=32000 > -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999 > -Dwrapper.debug="TRUE" -Dwrapper.pid=3920 -Dwrapper.version="3.2.3" > -Dwrapper.native_library="wrapper" -Dwrapper.service="TRUE" > -Dwrapper.cpu.timeout="10" -Dwrapper.jvmid=2 <snip> |