Hi, I have a servlet that connects to a database no problem when tomcat has been recently re-started, but after some time has elapsed, even if there aren't any users on the system, it takes a very long time to get a connection object and eventually just fails completely. Does anyone know what this might be please? Or suggest ways I might be able to de-bug the problem. I'm using tomcat4 on linux, the database is on a remote box from the webapp Many thanks.
are you closing and releasing your connections ?? Maybe you should use a connection pool (of your container or some free) to handle your connections and don't do that directly in your servlet.
Joined: Jan 08, 2002
yes I'm closing the ResultSet, Statement and Connections. I'm using the dbcp connection pool from the Jakarta Commons package but I'm not sure that it's a problem with the pool as it happens on another site I'm writing that doesn't use pooling.