6 Replies Latest reply on Aug 20, 2003 12:09 AM by jonlee

    Problem stutting down JBoss/Tomcat

    nbirch

      Hi,

      I occasionaly get a hang in the JBoss shutdown. The server.log halts with the following as the last set of lines:

      12:30:11,061 INFO [Server] Undeploying all packages
      12:30:11,062 INFO [MainDeployer] Undeploying file:/opt/fpdirector/jboss/server/fpdirector/deploy/emsEJB.ear
      12:30:11,062 INFO [EmbeddedCatalinaServiceSX] undeploy, ctxPath=/emsweb, warUrl=file:/opt/fpdirector/jboss/server/fpdirector/tmp/deploy/server/fpdirector/deploy/emsEJB.ear/78.emsEJB.ear-contents/emsweb.war
      12:30:11,063 INFO [Engine] StandardHost[localhost]: Removing web application at context path /emsweb
      12:30:11,064 INFO [Engine] StandardWrapper[/emsweb:default]: Waiting for 1 instance(s) to be deallocated
      12:30:20,364 INFO [Engine] StandardHost[localhost]: MAPPING configuration error for request URI
      12:30:20,374 INFO [Engine] StandardHost[localhost]: MAPPING configuration error for request URI


      This is quite rare, but its a problem. It seems to happen when things are running very slowly (due to another issue). What is causing this? I'm running JBoss 3.0.2 with embedded Tomcat.

      Thanks
      NBirch

        • 1. Re: Problem stutting down JBoss/Tomcat
          nbirch

          Followup:

          I'm assuming that the following line is the real problem and it may have hung here.
          12:30:11,064 INFO [Engine] StandardWrapper[/emsweb:default]: Waiting for 1 instance(s) to be deallocated

          These lines which came 9 seconds later would be browser requests that came in, but the app was in the process of being undeployed...
          12:30:20,364 INFO [Engine] StandardHost[localhost]: MAPPING configuration error for request URI
          12:30:20,374 INFO [Engine] StandardHost[localhost]: MAPPING configuration error for request URI


          Could requests coming in while an app is undeploying cause problems, or did it hang while undeploying?

          Thanks
          NBirch

          • 2. Re: Problem stutting down JBoss/Tomcat
            jonlee

            It is possible that there is activity in the web application that is holding up undeployment - perhaps execution in a web application class. I'm not sure what would happen in such a case. I don't think there is a way to come back and try undeployment again on a failure.

            • 3. Re: Problem stutting down JBoss/Tomcat
              nbirch


              Hi,

              We use "kill <jboss-pid>" to stop JBoss/Tomcat. Is this a safe way to shutdown? Does the shutdown.sh script method allow cleanup to occur?

              Thanks
              NBirch

              • 4. Re: Problem stutting down JBoss/Tomcat
                jonlee

                A standard kill signal should cause JBoss to shutdown in the standard manner. You can verify this by checking the server.log output.

                • 5. Re: Problem stutting down JBoss/Tomcat
                  nbirch

                  Yes the server.log looks fine. I compaired a kill vs a shutdown.sh and the only difference is that the shutdown.sh has 2 initial lines indicating that shtdown has started.

                  Another symptom of this hang during the undeployment is that it only seems to happen when JBoss has maxed out on its memory allocation. We start JBoss with 256M, and ps indicates that its consuming 300M. We may need to bump up the allocation.

                  Thanks,
                  NBirch

                  • 6. Re: Problem stutting down JBoss/Tomcat
                    jonlee

                    The memory footprint shown by Linux is different to the heap space allocated. The VSZ/RSS includes the memory consumed by the JVM and code whereas the heap space set for your JVM (-Xmx..m)is for the storage of objects and simple variables.

                    You can turn on verbose:gc (in Sun Java) and get console output indicating heap memory (among other things) after GC operations. This does affect performance but is sometimes useful for test purposes. You might want to try that. Usually total use of heap memory will be signalled by "out of memory" messages or similar.