JedisPooled Connection not closing #3829
-
I aim to employ JedisPooled for executing FTSearch commands. Thus, I transitioned from using Jedis pool to JedisPooled. However, when the load increases, I noticed that connections established with JedisPooled are not closing properly. Upon inspecting file descriptors, I observed that many connections remain in the established state. Jedis version: 4.2.3 Thank you in advance for your assistance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Describe how the connections are "not closing properly"? Why do you want to close connection "the load increases"? |
Beta Was this translation helpful? Give feedback.
-
i mean.. if a request is made, say 'set' command is executed and if there
is no connection then the connection pool will create a new connection and
execute the request after executing the request it will return the
connection to the pool so that that connection will be used for another
request..
But while using jedispooled the connection is not reused instead it's
asking for a new connection and if max total connection is reached the
request is waiting..
I was using jedispool earlier in which i was taking connection for jedis
pool and returning it back like this
try (Jedis jedis = jedisPool.getResource())
which was working fine .... there were no major code change only i
changed the following jars to get jedispooled working
commons-pool2-2.3.jar -> commons-pool2-11.1.jar
jedis 3.9.0 -> jedis 4.2.3
For configuring jedispooled i am using the following configuration
JEDIS_POOLED_CONFIG = new ConnectionPoolConfig();
JEDIS_POOLED_CONFIG.setMaxTotal(8);
JEDIS_POOLED_CONFIG.setMaxIdle(4);
I am new to jedis pooled. kindly share your thoughts on how to debug this
issue..
do i have to add anything else in configurations.
Thanks for your reply...
…On Sat, May 4, 2024 at 2:47 PM M Sazzadul Hoque ***@***.***> wrote:
Describe how the connections are "not closing properly"? Why do you want
to close connection "the load increases"?
The way it is written now, I don't understand the issue.
—
Reply to this email directly, view it on GitHub
<#3829 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANCPEBONTZZY25GOEWRPYODZASRR3AVCNFSM6AAAAABHFBH622VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TGMJSGYZDA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
JedisPooled does exactly that internally 😕