Organic behavior from static connection pool

Skip to first unread message

Cointopay International B.V.

Jun 1, 2020, 7:29:40 AM6/1/20
to HikariCP
Hello all,

And thanks for reading this email, I will do my best to contribute to this group. But for now I just need to throw something in the group.
In my experience, setting a fixed amount of pool connections is good, when you don't want any surprises. This is one of the design patterns of Hikari and this is appreciated.
I am seeking for a little bit more flexibility on this and don't know how to achieve this.

Right now when I set e.g. 24 connections then it will run just fine for some time, but after some time it will run out of connections and that blocks the entire program from functioning and it is not able to recover from that.
I know this has something to do with the amount of use cases that we support and should seperate them, but hey, this is where we are at the moment (so what can we do).

So what would be preferred is to have e.g. 24 pool connections, but if it runs out of connections organically increase to e.g. 64 connections, and then gracefully let the pool connections timeout over time, since they are not used any longer.
That is what I mean with Organic behavior, right now Hikari is a bit too rigid to fit all my needs. It is good pool manager software, don't get me wrong, but it could use some agility in this area.

Right now I have to hard set to 64 connections, but I don't want to do that since it's not recommended and also I find it a bit too much to have that setting all the time, since we don't need it always and I consider it a fail safe point.

How can I achieve the behavior I am looking for, and is it supported even. Thoughts?

Looking forward to your input. Also on pros and cons etc.

Brett Wooldridge

Jun 1, 2020, 11:18:42 AM6/1/20
to HikariCP
You might investigate FlexyPool.  It is a pool/pool manager that sits over a connection pool and attempts to adjust the pool constraints dynamically based on metrics.  For example, it supports the concept of an "overrun" size beyond the normal maximum pool size.


p.s. you should also to run with HikariCP's leakDetectionThreshold enabled just to make sure you don't have any leaks.

Cointopay International B.V.

Jun 28, 2020, 2:36:05 PM6/28/20
to HikariCP
For anybody interested, I am sticking to what I have right now! Reason being is that FlexyPool is not actively supported and also it adds additional complexity which I am trying to avoid as much as possible! Thanks for your response.

Oct 1, 2020, 1:47:54 PM10/1/20
to HikariCP
Why not just set the maximumPoolSize to 64 and minimumIdle to 24?  That would seem to give you the behavior you are after.

Oct 2, 2020, 4:13:22 PM10/2/20
to HikariCP
Hi, thanks a lot, have implemented it, seems to work fine. 
Reply all
Reply to author
0 new messages