Reputation: 589
when cpu reaches 100% my jvm restarts automatically with following error message.why it happens ???
Error:
ERROR | wrapper | 2012/04/05 20:00:31 | Shutdown failed: Timed out waiting for signal from JVM.
ERROR | wrapper | 2012/04/05 20:00:31 | JVM did not exit on request, terminated
STATUS | wrapper | 2012/04/05 20:00:36 | Launching a JVM...
INFO | jvm 4 | 2012/04/05 20:00:38 | WrapperManager: Initializing...
INFO | jvm 4 | 2012/04/05 20:00:43 | Apr 5, 2012 8:00:43 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO | jvm 4 | 2012/04/05 20:00:43 | INFO: Initializing Coyote HTTP/1.1 on http-8181
INFO | jvm 4 | 2012/04/05 20:00:43 | Apr 5, 2012 8:00:43 PM org.apache.catalina.startup.Catalina load
INFO | jvm 4 | 2012/04/05 20:00:43 | INFO: Initialization processed in 2375 ms
INFO | jvm 4 | 2012/04/05 20:00:43 | Apr 5, 2012 8:00:43 PM org.apache.catalina.core.StandardService start
INFO | jvm 4 | 2012/04/05 20:00:43 | INFO: Starting service Catalina
INFO | jvm 4 | 2012/04/05 20:00:43 | Apr 5, 2012 8:00:43 PM org.apache.catalina.core.StandardEngine start
INFO | jvm 4 | 2012/04/05 20:00:43 | INFO: Starting Servlet Engine: Apache Tomcat/5.5.25
INFO | jvm 4 | 2012/04/05 20:00:44 | Apr 5, 2012 8:00:44 PM org.apache.catalina.core.StandardHost start
Upvotes: 3
Views: 4952
Reputation: 892
This is not JVM that is restarting. It is the wrapper script that you are using is shutting down it and starts again. This is how it is configured. Looks your application does a lot of CPU usage. You may try to go through both heap dumps and GC logs to see if it's related to garbage collector.
Upvotes: 2
Reputation: 3424
Based on your comments, you did not specify any memory configuration for Tomcat. My guess is Tomcat is using whatever memory it needed to execute all the requests. And as I told before, Tomcat should throw a PermgenSpace error when it consumes maximum available memory, before CPU reaches 100%. (And then you need to manually restart of course.) This scenario can be avoided if you set up a predefined memory configuration for tomcat server.
Also if you are loading your application with <Context>
then specifying reloadable="false"
also makes the Tomcat not to reload the context automatically.
Upvotes: 0