tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aggarwal, Ajay" <>
Subject RE: tomcat shutdown: STOP vs SIGTERM
Date Mon, 08 Mar 2010 19:56:00 GMT
When I send SIGTERM to tomcat, I actually do get

1) these messages in my catalina.out

  Mar 8, 2010 2:46:05 PM org.apache.catalina.core.StandardService stop
  INFO: Stopping service Catalina


2) my servlets destroy() methods do get called.

That’s why I suspect that even SIGTERM seems to bring tomcat down in an orderly manner.
I should mention that I am on a linux platform, running tomcat 6.0.20.

As to why on a busy system, " stop" takes longer I really don't have the details.
All I can say is that sometimes I don't even see the above messages for first 20-25 seconds.
Could it be because " stop" has to start another JVM and then send a "stop" message
to tomcat process over a local loop interface and on a busy system, both of these require
resources which may not be available.


-----Original Message-----
From: Christopher Schultz [] 
Sent: Monday, March 08, 2010 1:33 PM
To: Tomcat Users List
Subject: Re: tomcat shutdown: STOP vs SIGTERM

Hash: SHA1


On 3/8/2010 12:53 PM, Aggarwal, Ajay wrote:
> Sometimes on a busy system I have seen that " stop" does take
> a long time to shutdown tomcat.

You might want to investigate why this is happening: my Tomcat instances
(we have 4 in production) take only a few seconds to shut down completely.

> We are running another "monitoring
> service" on the system that monitors tomcat and few other system
> services. After issuing "" and waiting for some time (up to
> 25 seconds) it loses patience and gives a SIGTERM to tomcat process.
> SIGTERM seems to bring tomcat down much faster.


> What is  the downside of using SIGTERM, if any?

I tried issuing a SIGTERM to my JVM/Tomcat process running in
development, and I got some messages in the app log file that indicated
that the webapp was coming down. But, I didn't get any "shutting down"
messages in catalina.out which leads me to believe that the shutdown
wasn't entirely clean.

> It does seem to bring
> tomcat down in an orderly manner and much faster than "
> stop".

Well, definitely faster, but I'm not sure about orderly: you should
check to see what things aren't stopping and determine if they are
potentially disastrous it TERMinated.

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message