Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat times out on shutdown

 
Ron Newman
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I shut Tomcat down, via the bin/shutdown.sh script, Tomcat takes a long time to actually stop. I find this in my catalina.out log file. What does it mean, and how can I fix it?
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat uses a Socket Connection to the Running server to control it. It's waiting for the server to send a notice that it quit. The server is waiting for all Threads started to terminate. Perhaps you have started a Thread in one of your applications and don't have a shutdown hook to end it! A connection pool or cache manager is one type of Thread.
Do any of your apps start a Thread?
 
Ron Newman
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do have a connection pool, registered with JNDI. I don't see any way to get hold of it and shut it down when the Servlet context is destroyed (in fact, this is something I've asked about in other posts here, without getting a good answer.)
[ August 14, 2003: Message edited by: Ron Newman ]
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it the Container specific JNDI DataSource? Tomcat knows how to control that and that should not cause a problem. If it is some other implementation, you need to find out how it's controlled.
 
Ron Newman
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it's the Tomcat JNDI DataSource connection pool. So far, I don't have any evidence that Tomcat ever shuts it down.
 
Ron Newman
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, the timeout exception occurs in catalina.out , NOT in the shell window where I run the "shutdown.sh" script.
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which version of Tomcat? Whcih JDK?
 
Ron Newman
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat 4.1.24 on Java 1.4.1 on MacOS X 10.2.6.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic