You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bs...@arsdigita.com on 2000/09/19 15:37:38 UTC

connections not closing

Please forgive me if this question has already been asked, but:

I'm having trouble getting HTTP connections to close under Tomcat after
JSP pages complete.  Sometimes, the first time a page is compiled and
displayed after server start-up, the entire page will be served, but
Tomcat won't close the connection to the server.  I've played with
HttpConnectionHandler.java a little bit, and I've noticed that
socket.close() is indeed being called, and the operation does not
block--yet the underlying socket won't close; netstat says it's still in
the "ESTABLISHED" state.

This problem only happens in JSP pages that grab a database handle from
an Oracle connection pool (Oracle 8.1.6, using
OracleConnectionPoolDataSource and the oci8 driver.  The problem doesn't
surface with the thin driver.

I've experienced this problem under JDK 1.2 and JDK 1.3, with Solaris
2.7, and Tomcat 3.1 release.  I've also noticed that
socket.shutdownOutput under JDK 1.3 seems to make the problem go away,
but it's not terribly portable.

Any ideas what might possibly be going on here?  Any other clever ways
to force sockets to close?

-- Bill