commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony Presley <>
Subject DBCP "Statement already closed .... how?"
Date Mon, 24 Nov 2003 23:15:12 GMT
Hello all ....

I've been using DBCP to develop an application for the last 12 months,
and it's finally been placed into "active" use.  Which is great ...
except that it didn't scale very well.  When being used by less than 10
or 15 users, it's fine.  However, as soon as the number of users
increases (or I simulate by clicking on a bunch of database links at one
time), I start getting a lot of "'Statement' already closed." error's in
my logs.

As far as I can tell, I'm not doing any double closings.  Again, this
works fine and dandy when there's only a few users, but once several
people get on it, it starts with these errors, and they're rather
annoying.  Most intruiging is that if you wait a few seconds, then try
again, requests to the database work fine.

I've thrown in a LOT of log() statements in my code to ensure that the
database connections are, in fact, being closed and returned to the pool
-- and they are.  From what I can tell, they're being closed somewhere
in the middle of the processing of them.

My Tomcat config looks like (and I'm using DBCP 1.1 and nightly (have
tried both) and Pool 1.1) :

        <ResourceParams name="jdbc/ifx" scope="Shareable">



                        <value>SELECT FROM user WHERE id =





A chunk of the log is:

2003-11-24 17:04:29 InternalClients: Closing connections
2003-11-24 17:04:29 InternalClients: ERROR: Servlet InternalClients, SQL
Error lookup up General Information: 'Statement' already closed.
RootCause: null: /Error
2003-11-24 17:04:29 InternalClients: ERROR: Servlet InternalClients,
General Error viewing internal client information: null RootCause: null:
2003-11-24 17:04:29 InternalClients: Closing connections
2003-11-24 17:04:29 InternalClients: Closed
2003-11-24 17:04:29 StandardWrapperValve[InternalClients]:
Servlet.service() for servlet InternalClients threw exception
        at azure.servlets.Azure.err(
        at azure.servlets.InternalClients.doGet(
        at javax.servlet.http.HttpServlet.service(
        at javax.servlet.http.HttpServlet.service(

Again, the link that generated the error .... clicking on it right after
it logged these error's, it works fine.  Which obviously (to me?) leads
me right to ... a problem with the DBCP, or the DB, or my code.  These
are not simple problems to troubleshoot, it appears.

I can post the code the generates this .... if that would help.  At this
point in the game, I'm pretty much at my wits ends.

Any help is much appreciated ....


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message