commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r746840 - in /commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl: GenericKeyedObjectPool.java GenericObjectPool.java
Date Sun, 22 Feb 2009 22:30:33 GMT
Author: markt
Date: Sun Feb 22 22:30:32 2009
New Revision: 746840

URL: http://svn.apache.org/viewvc?rev=746840&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/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPool.java

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java?rev=746840&r1=746839&r2=746840&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
Sun Feb 22 22:30:32 2009
@@ -671,6 +671,13 @@
 
     /**
      * Sets the cap on the number of "idle" instances in the pool.
+     * If maxIdle is set too low on heavily loaded systems it is possible you
+     * will see objects being destroyed and almost immediately new objects
+     * being created. This is a result of the active threads momentarily
+     * returning objects faster than they are requesting them them, causing the
+     * number of idle objects to rise above maxIdle. The best value for maxIdle
+     * for heavily loaded system will vary but the default is a good starting
+     * point.
      * @param maxIdle the maximum number of "idle" instances that can be held
      * in a given keyed pool. Use a negative value for no limit.
      * @see #getMaxIdle

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPool.java?rev=746840&r1=746839&r2=746840&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPool.java
Sun Feb 22 22:30:32 2009
@@ -621,6 +621,13 @@
 
     /**
      * Sets the cap on the number of "idle" instances in the pool.
+     * If maxIdle is set too low on heavily loaded systems it is possible you
+     * will see objects being destroyed and almost immediately new objects
+     * being created. This is a result of the active threads momentarily
+     * returning objects faster than they are requesting them them, causing the
+     * number of idle objects to rise above maxIdle. The best value for maxIdle
+     * for heavily loaded system will vary but the default is a good starting
+     * point.
      * @param maxIdle The cap on the number of "idle" instances in the pool.
      * Use a negative value to indicate an unlimited number of idle instances.
      * @see #getMaxIdle



Mime
View raw message