commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Davidson <>
Subject Re: DBCP woes (running out of cursors).
Date Fri, 23 Oct 2009 20:09:51 GMT
Phil Steitz wrote:
> Sorry for the slow response.  Sounds like you have solved your
> problem.  I assume you are now getting SQLExceptions when you go
> past the maxOpenPreparedStatements limit. If not, there must be
> something else going on.

Things are working fine now that I have it limited.  No more SQLException's
since I no longer run out of cursors.

> Thanks for the documentation feedback.  Fixed in trunk.

Thanks for fixing it; though I think it would be nice if the note went 
out to
the current documentation page, since this may bite other people just as it
did me.

> This example makes me think that better behavior here would be for
> the prepared statement pool to act as an LRU cache (rather than
> throwing SQLException when maxOpenPreparedStatements is exceeded).
> Interested in other opinions on this.

I'm confused.

It's not throwing exceptions when maxOpenPreparedStatements is exceeded.
I thought that was the point of maxOpenPreparedStatements.  As I understand
it, when the pooling mechanism hits the maximum and it can't reuse 
anything that's
in the pool, it closes older PreparedStatement's in the pool that are 
not being used
at the moment so that it can create a new one and stay under the maximum. At
least, that would be consistent with what I'm seeing in my database when 
I check
on the number of open cursors.

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

View raw message