Affects Version/s: 2.4.3, 2.5.0, 2.6.0
Fix Version/s: 2.6.1
POOL-303's fix, even if we specify maxWaitMillis, object creation continues waiting for longer time without any hard limit at https://github.com/apache/commons-pool/blob/3e6dfcd61ddcd88b18934738ebda05c84c948a80/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java#L848.
Here's the actual stacktrace:
As example of this issue,
we use Jedis2.9 with commons-pool 2.4.3 and maxWaitMillis=500ms in our environment.
However, when master node is down and the connection pool for the node is full, succeeding JedisConnections wait there forever until pool is free.
Therefore, borrowObject (and the aborting) of last connections takes 40 ~ 80 sec at worst case.
In order to avoid such situations, we should set hard limit to wait by reusing maxWaitMillis or another value.