|
From: Leif M. <le...@ta...> - 2003-08-14 08:54:44
|
Georg Schmid wrote: > a few hours ago I downloaded the Wrapper 3.0.4 in order to improve the > uptime of my JBoss servers. Everything works fine so far, but now I am > not sure anymore, whether Wrapper can solve my problems. > > 1) Restarting after OutOfMemory exceptions works after defining the > appropriate filter. I also want the wrapper to restart the server at > most 5 times. When I tested this by specifying 8 MB max. heap, the > server was restarted continuously (had to kill it after jvm 7 came up). The wrapper.max_failed_invocations property only controls the number of restarts due to a failed startup. If the JVM is restarted due to a call to WrapperManager.restart() or due to a filter, as in your case, then there is no limit to the number of times that the JVM will be restarted. If you think about it, this is good behavior. If your application runs out of memory once per day, you would want it to always be restarted. Not restart for 5 days and then give up and quit. In this case, the Wrapper is working as expected. In general, if your application is running out of memory, that is a bug in your application. The Wrapper makes it possible to work around such problems temporarily, but they really should be fixed at some point. > 2) The second problem is, that the (locally running, nohup-started) > servers go down, when the network goes down. They seem to get a > "normal" TERM, just like pressing Ctrl-C or issuing a kill (without > -9). JBoss shuts down cleanly, working its shutdown hook, but Wrapper > does not restart the process, as I expected. I introduced a filter, > that checks for "Shutting down the JVM" string and then triggers a > RESTART. The filter matches, but no restart occurs, instead the > wrapper stops. If your OS is sending a TERM signal to the JVM and Wrapper, then it is correct that the Wrapper is quitting. Catching the message using a filter and attempting to restart will not work because the Wrapper is already trying to shut itself down. Processes should always respond to a kill TERM by exiting gracefully. Please explain if I am missing something. But it seems like the Wrapper is behaving correctly here. If it were to respond to a TERM signal by restarting the JVM then there would be no way to kill the Wrapper other than a kill -9, which would of course be bad. > 3) I could not find a parameter to control the ping frequency (not the > timeout). The ping slows down the application, and for a server, that > should be running for half a year a ping every 30 seconds or similar > would be good enough. There is already a feature request to be able to control the ping time. But how are you seeing that the ping is slowing down your application. Theoretically that is true as there is additional work being done. But it is very insignificant. The longer the ping interval, the less responsive the Wrapper will be to a hung JVM. Pinging once every 5 seconds with debug output off has never caused any noticeable performance issues in my experience. Cheers, Leif |