javatomcat7apache2.2

Tomcat7 status Stopping in windows service


I have Apache 2.2 and 4 Tomcat7 instance is running

One of the tomcat is configured for 1500 threads and 1024 Mb of Java heap space as the web application require such a deal...

So at time i face a lot of user traffic and the application gets slow, i restart the tomcat for a fix which in-turn makes the service showing status 'STOPPING'enter image description here


Solution

  • If you want to get out of this situation, you could follow the steps as shown below.

    Open Command prompt (Run as Administrator) on Windows Vista and Win 7

    Query Service details using the following command (where Tomcat_7.0.7 is the service name of the Tomcat instance):

    sc queryex Tomcat_7.0.7
    

    You will be able to find the details related to the service (as shown below):

    C:\WINDOWS\system32>sc queryex Tomcat_7.0.7
    
            SERVICE_NAME: Tomcat_7.0.7
            TYPE               : 10  WIN32_OWN_PROCESS
            STATE              : 3  STOP_PENDING
                                    (NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
            WIN32_EXIT_CODE    : 0  (0x0)
            SERVICE_EXIT_CODE  : 0  (0x0)
            CHECKPOINT         : 0x3
            WAIT_HINT          : 0x0
            PID                : 2340
            FLAGS              :
    

    Now get the PID details from the above, use the command as shown below to kill it (to resolve the issue).

    taskkill /PID 2340 /F
    

    This page gives more details on the same!

    Hope this helps!