You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Sankaranarayanan (Ganesh) Ganapathy" <sg...@vitria.com> on 2002/07/31 02:21:00 UTC

Tomcat 4.0.4 HTTP connector shutdown issue

Hi All,

I am running tomcat server 4.0.4 on  win2k. I have a simple client that repeatedly keeps sending requests to Tomcat... my client program hangs once in a while during Tomcat shutdown. My client program does the following:

URL url = new URL("somerequest");
HttpURLConnection httpUrlConnection = (HttpURLConnection) url.openConnection();
httpUrlConnection.setUseCaches(false);
httpUrlConnection.getContent();  //The code hangs here once a while during tomcat shutdown

>From the tomcat code I see that the tomcat shutdown sequence does the following:

1. Shutdown all the processors (essentially the background threads)
2. Shutdown the connector background thread - which cause the server socket to be closed

Since the server socket is not closed first - the incoming requests are accepted - but they are not processed as the processors are being shutdown. The logs illustrate my point too.

Shouldnt the shutdown sequence be the other way?

Am I missing something here... Is there a way for me to work around this problem?

Thanx
Ganesh

 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>