commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <phil.ste...@gmail.com>
Subject Re: DBCP woes (running out of cursors).
Date Sun, 18 Oct 2009 17:10:45 GMT
Bill Davidson wrote:
> Bill Davidson wrote:
>>Could maxOpenPreparedStatements possibly fix this?
> 
> Apparently it does.
> 
> The DBCP config docs need a better warning on poolPreparedStatements:
> 
> "*NOTE* - Make sure your connection has some resources left for the
> other statements."
> 
> just doesn't quite cut it.  Something more like:
> 
> "Pooling PreparedStatement's may keep their cursors open in the database,
> causing you to run out of cursors.  You should also set
> maxOpenPreparedStatements to some value less than the maximum number
> of cursors you can have on a Connection."
> 
> or something along those lines.

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.

Thanks for the documentation feedback.  Fixed in trunk.

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.

Phil


> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message