Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 240
vivek Avatar asked May 29 '14 08:05

vivek


2 Answers

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!

like image 59
N00b Pr0grammer Avatar answered Sep 28 '22 09:09

N00b Pr0grammer


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.

like image 31
Mark Thomas Avatar answered Sep 28 '22 09:09

Mark Thomas