commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shunsuke Nakamura (JIRA)" <>
Subject [jira] [Created] (POOL-347) borrowObject waits for maxWaitMillis over in pool full
Date Fri, 20 Jul 2018 16:44:00 GMT
Shunsuke Nakamura created POOL-347:

             Summary: borrowObject waits for maxWaitMillis over in pool full
                 Key: POOL-347
             Project: Commons Pool
          Issue Type: Bug
    Affects Versions: 2.6.0, 2.5.0, 2.4.3
            Reporter: Shunsuke Nakamura

Since POOL-303's [fix|],
even if we specify maxWaitMillis, object creation continues waiting for longer time without
any hard limit at [this line|].

Here's the actual stacktrace:
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x0000000741158358> (a java.lang.Object)
	at java.lang.Object.wait(
	at org.apache.commons.pool2.impl.GenericObjectPool.create(
	- locked <0x0000000741158358> (a java.lang.Object)
	at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(
	at org.apache.commons.pool2.impl.TestGenericObjectPool.testReturnBorrowObjectWithingMaxWaitMillis(

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 Pool is full, successor connections for dead master
wait at the line until pool is free. Therefore, aborting old connections takes 40 ~ 80 sec.

In order to avoid such situations, we should set hard limit to wait by reusing maxWaitMillis
or another value.  

This message was sent by Atlassian JIRA

View raw message