|
From: Leif M. <lei...@ta...> - 2011-09-11 14:22:05
|
Karthik, You can get the Wrapper version by running "wrapper -v" from the command line. If you don't get a version then it is older than 3.3.0 as the version used to be displayed differently. The ability to execute external commands is a Professional Edition feature so that is not going to be possible with the Standard or Community Editions. The message that you are seeing about the JVM being frozen is being generated by the Wrapper binary as it kills the Java process. For this reason there is not a way for you to run other code unless you use the Professional Edition. If you want to try it out, you can get a one month trial license using the button on the top right of the wrapper's page: http://wrapper.tanukisoftware.com/ The Wrapper has several checks that it uses to monitor the JVM. The one that is timing out in your case is a ping test. The Wrapper, by default sends a ping to the JVM and then expects a reply almost immediately. The ping reply can be delayed by heavily loaded systems, so the Wrapper waits for up to the wrapper.ping.timeout (30 second default) before deciding that the JVM will not reply. At that point, it assumes it is frozen and starts the restart process. This is described in more detail with a diagram on the following page: http://wrapper.tanukisoftware.com/doc/english/prop-ping-timeout.html Cheers, Leif On Sun, Sep 11, 2011 at 8:06 PM, karthik Krishnan <kar...@gm...> wrote: > > Hi Leif, > > thanks a ton for ur reply!!! > > The appl. is installed a year ago in the client machine by someone unknown > to me.. So i really dont know the Wrapper edition and version.. > > Can u please tell me How to find that.. is there any command i can try to > find the version and edition.. which will be helpful in my case to do > somethng for the JVM Hungs.. > > Also.. Can you tell me if its possible to invoke external appl. in the > standard edition.. > Or can u tell me what is the file that invokes the wrapper to restart the > service.. or where does the Wrapper concludes that JVM is Hung!!!.. i see > there is a log that JVM is Hung!!!.. Which file does that writing into > log....If i know this.. i can try to invoke a external prog from that point > before it writes JVM hung to wrapper.. > > Thanks in advance > > Karthik > > Leif Mortenson-3 wrote: >> >> Karthik, >> JVM restarts like this are usually caused by the JVM itself freezing >> and needing to be restarted. There are however times where the JVM >> is temporarily frozen by heavy disk IO or memory swapping. If you >> are seeing this problem repeatedly, I would suggest setting the >> wrapper.ping.timeout to a longer value and seeing if the JVM recovers >> on its own. Whether it is a permanent or temporary freeze, there is >> a problem that needs to be resolved as your application will not be >> responsive to user requests when it is unable to respond to the >> Wrapper's pings. >> >> When the JVM is restarted, the first JVM is first shutdown. What >> version of the Wrapper are you using though? There was a problem >> fixed in 3.3.1 where the Wrapper was sometimes failing to actually >> kill a JVM process which it decided to kill. If you are having this >> problem then you will need to upgrade. Depending on the OS you are >> running, it is also possible that the ports are still in a locked >> state until their timeout has expired. In this case, you may want to >> try increasing the delay before launching the second JVM instant. You >> can do this with the wrapper.restart.delay property. >> http://wrapper.tanukisoftware.com/doc/english/prop-restart-delay.html >> >> The professional edition of the Wrapper makes it possible for you to >> launch an external process at various points in the Wrapper and JVM >> lifecycle. This includes just before a JVM restart: >> http://wrapper.tanukisoftware.com/doc/english/props-event.html#command >> >> Please let me know how these options work for you. >> >> Cheers, >> Leif >> >> >> On Sun, Sep 11, 2011 at 5:30 AM, karthik Krishnan <kar...@gm...> >> wrote: >>> >>> Hi, >>> >>> Reposting due to some mailing list subscription issue!!! Please ignore if >>> this is repeated. Inconvenience regretted.. >>> >>> I m facing issues like, when the JVM Hungs and restarts with below >>> message.. >>> sometimes, few services are not bound properly and giving us some >>> issues.. >>> >>> wrapper | JVM appears hung: Timed out waiting for signal from JVM. >>> wrapper | Java Virtual Machine did not exit on request, terminated >>> wrapper | Launching a JVM... >>> jvm 2 | Initializing... >>> >>> So, i need to write a program which will be called whenever the JVM Hungs >>> and restarts by itself to check if the services are bound properly. for >>> that >>> i need to know, from where can i invoke this program.. (Likely to call a >>> batch file from somewhere..).. Need to know which file and steps the >>> Wrapper >>> calls to restarts the service.. >>> >>> Or, is there any property that can be set to send a notification by mail >>> when there is a JVM Hung.. I know there is a email Notification available >>> in >>> prof edition. We are using a standard edition. >>> Can someone help me or let me know if u have done something similar to >>> this. >>> >>> Someone can throw light on why this happens.. and what could be done to >>> avoid such JVM Hang and restarts. >>> >>> Any help in this regard will be useful >>> >>> Thanks in Advance, >>> >>> Regards, >>> Karthik Krishnan |