wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Tomcat Shutdown Issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat Shutdown Issue" Watch "Tomcat Shutdown Issue" New topic
Author

Tomcat Shutdown Issue

Narasimha Swami
Greenhorn

Joined: May 27, 2008
Posts: 17
Hi Guys,

I have an issue with multiple tomcat instances' processes hanging over even on shutdown. I have fairly different configs for both the instances. But when I shutdown either of them sometimes one or other instance hangs over, which is not completely shutdown, they (hanged processes) just keep clogging up like this for a time. In some bad time they would have consumes all of the heap and I have no room to stop and start the instance. I have to issue manual kill for all the processes. I know there are several reasons for this happening can some one tell the few of them so that I can figure out and fix this bug. Although Tcat seems to be an fair option, but I am looking for a quick fix for now. Thank in advance.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16101
    
  21

You're better off asking this where the Tomcat experts hang out - in the Tomcat forum. I'll move this thread over there.

Tomcat itself doesn't have any shutdown problems that I know of. However, if even a single user application thread refuses to terminate itself when requested, that thread can hold the entire Tomcat server hostage, since until all threads are terminated, the JVM cannot terminate itself.

So you need to look at your applications.


Customer surveys are for companies who didn't pay proper attention to begin with.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12792
    
    5
I used the Tomcat Management app to detect some long-running request Threads that never terminated.

Working backward from that information I found Threads waiting for a resource that no-longer existed.

Bill
Narasimha Swami
Greenhorn

Joined: May 27, 2008
Posts: 17
Ya I found it out as soon as I posted the question. I have the app deployed in the tomcat instance which starts lots of threads. May be these threads have to be turned down. For now I just placed an small code snippet in start/stop init script to notify me if tomcat has not properly shut down. So that I can bring it down using kill command. Although forcing kill on the process is a bad idea.
 
GeeCON Prague 2014
 
subject: Tomcat Shutdown Issue