Tomcat7 status Stopping in windows service
Asked Answered
P

2

6

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

Pilau answered 29/5, 2014 at 8:57 Comment(3)
Hello Vivek. Could you please elaborate a bit more on what is your question?Amandy
Basically the application load is high i restart the tomcat at that time the tomcat service get struck in 'Stopping' status .... for which i need to restart the server machinePilau
@vivek, Do you mind accepting my answer if it answered your query?Adulterine
A
18

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!

Adulterine answered 31/8, 2016 at 10:1 Comment(1)
This works for Tomcat 8 too. Saved me having to reboot the server!Seanseana
P
3

Take a thread dump to find out what part of your application is stopping Tomcat from shutting down cleanly. Provided you are using a reasonably recent Apache Tomcat 7 release, there is an option to generate a thread dump accessible via the configuration tool that sits in the system tray.

Playtime answered 29/5, 2014 at 10:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.