You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ma...@apache.org on 2009/02/22 23:31:29 UTC
svn commit: r746841 - in /commons/proper/dbcp/trunk:
src/java/org/apache/commons/dbcp/BasicDataSource.java xdocs/configuration.xml
Author: markt
Date: Sun Feb 22 22:31:28 2009
New Revision: 746841
URL: http://svn.apache.org/viewvc?rev=746841&view=rev
Log:
Update docs as a result of investigations into DBCP-212. Add a note about the possible side effects of a low maxIdle value under heavy load.
Modified:
commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java
commons/proper/dbcp/trunk/xdocs/configuration.xml
Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java?rev=746841&r1=746840&r2=746841&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java (original)
+++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java Sun Feb 22 22:31:28 2009
@@ -252,6 +252,12 @@
/**
* The maximum number of connections that can remain idle in the
* pool, without extra ones being released, or negative for no limit.
+ * If maxIdle is set too low on heavily loaded systems it is possible you
+ * will see connections being closed and almost immediately new connections
+ * being opened. This is a result of the active threads momentarily closing
+ * connections faster than they are opening them, causing the number of idle
+ * connections to rise above maxIdle. The best value for maxIdle for heavily
+ * loaded system will vary but the default is a good starting point.
*/
protected int maxIdle = GenericObjectPool.DEFAULT_MAX_IDLE;
Modified: commons/proper/dbcp/trunk/xdocs/configuration.xml
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/xdocs/configuration.xml?rev=746841&r1=746840&r2=746841&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/xdocs/configuration.xml (original)
+++ commons/proper/dbcp/trunk/xdocs/configuration.xml Sun Feb 22 22:31:28 2009
@@ -160,6 +160,15 @@
</td>
</tr>
</table>
+<p>
+<img src="images/icon_warning_sml.gif"/>
+<strong>NOTE</strong>: If maxIdle is set too low on heavily loaded systems it is
+possible you will see connections being closed and almost immediately new
+connections being opened. This is a result of the active threads momentarily
+closing connections faster than they are opening them, causing the number of
+idle connections to rise above maxIdle. The best value for maxIdle for heavily
+loaded system will vary but the default is a good starting point.
+</p>
<table>