|
From: Patrick W. <wo...@em...> - 2004-01-12 22:26:25
|
I using the wrapper to control an app that uses an ill-behaved library. I set a filter to detect the string "Out of Memory" which the library will spit out before it calls System.exit(). However in testing it looks like after the filter is triggered the wrapper is being told to shutdown and this overrides the restart behaviour. Is there any way to make the restart take precedence regardless of what comes later? My filters are configured as: wrapper.filter.trigger.1=java.lang.OutOfMemoryError wrapper.filter.action.1=RESTART wrapper.filter.trigger.2=Out of Memory wrapper.filter.action.2=RESTART And here is the output of my log file: DEBUG | wrapperp | 2004/01/12 14:05:10 | send a packet PING : ping INFO | jvm 1 | 2004/01/12 14:05:11 | Received a packet PING : ping INFO | jvm 1 | 2004/01/12 14:05:11 | Send a packet PING : ok INFO | jvm 1 | 2004/01/12 14:05:11 | Out of Memory STATUS | wrapper | 2004/01/12 14:05:11 | Filter trigger matched. Restarting JVM. DEBUG | wrapper | 2004/01/12 14:05:11 | wrapperRestartProcess() called. INFO | jvm 1 | 2004/01/12 14:05:11 | You might want to try the -mx flag to increase heap size INFO | jvm 1 | 2004/01/12 14:05:11 | Stopping service Tomcat-Standalone INFO | jvm 1 | 2004/01/12 14:05:11 | Wrapper Manager: ShutdownHook started INFO | jvm 1 | 2004/01/12 14:05:11 | Send a packet STOP : 0 DEBUG | wrapperp | 2004/01/12 14:05:11 | read a packet PING : ok DEBUG | wrapper | 2004/01/12 14:05:11 | Got ping response from JVM DEBUG | wrapperp | 2004/01/12 14:05:11 | read a packet STOP : 0 DEBUG | wrapper | 2004/01/12 14:05:11 | JVM requested a shutdown. (0) DEBUG | wrapper | 2004/01/12 14:05:11 | wrapperStopProcess(0) called. DEBUG | wrapper | 2004/01/12 14:05:11 | Sending stop signal to JVM DEBUG | wrapperp | 2004/01/12 14:05:11 | send a packet STOP : NULL INFO | jvm 1 | 2004/01/12 14:05:11 | Received a packet STOP : INFO | jvm 1 | 2004/01/12 14:05:12 | Thread, Wrapper-Shutdown-Hook, handling the shutdown process. INFO | jvm 1 | 2004/01/12 14:05:12 | calling listener.stop() INFO | jvm 1 | 2004/01/12 14:05:12 | Catalina.stop: LifecycleException: This server has not yet been started INFO | jvm 1 | 2004/01/12 14:05:12 | LifecycleException: This server has not yet been started INFO | jvm 1 | 2004/01/12 14:05:12 | at org.apache.catalina.core.StandardServer.stop(StandardServer.java:2213) INFO | jvm 1 | 2004/01/12 14:05:12 | at org.apache.catalina.startup.Catalina.start(Catalina.java:543) INFO | jvm 1 | 2004/01/12 14:05:12 | at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) INFO | jvm 1 | 2004/01/12 14:05:12 | at org.apache.catalina.startup.Catalina.process(Catalina.java:180) INFO | jvm 1 | 2004/01/12 14:05:12 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) INFO | jvm 1 | 2004/01/12 14:05:12 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) INFO | jvm 1 | 2004/01/12 14:05:12 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) INFO | jvm 1 | 2004/01/12 14:05:12 | at java.lang.reflect.Method.invoke(Method.java:324) INFO | jvm 1 | 2004/01/12 14:05:12 | at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) INFO | jvm 1 | 2004/01/12 14:05:12 | at BootstrapLauncher$1.run(BootstrapLauncher.java:146) INFO | jvm 1 | 2004/01/12 14:05:12 | returned from listener.stop() INFO | jvm 1 | 2004/01/12 14:05:12 | Send a packet STOPPED : 0 DEBUG | wrapperp | 2004/01/12 14:05:12 | read a packet STOPPED : 0 DEBUG | wrapper | 2004/01/12 14:05:12 | JVM signalled that it was stopped. INFO | jvm 1 | 2004/01/12 14:05:12 | Closing socket. INFO | jvm 1 | 2004/01/12 14:05:12 | Closed socket: java.net.SocketException: socket closed DEBUG | wrapperp | 2004/01/12 14:05:12 | socket read no code (closed?). INFO | jvm 1 | 2004/01/12 14:05:13 | Server daemon shut down INFO | jvm 1 | 2004/01/12 14:05:13 | Wrapper Manager: ShutdownHook complete DEBUG | wrapper | 2004/01/12 14:05:13 | JVM exited normally. STATUS | wrapper | 2004/01/12 14:05:14 | <-- Wrapper Stopped |