Minimum and maximum pool size

Hi experts,

I am having small doubt in JDBC Adapter.what should be the minimum connection size for minimum pool,and what should be maximum size for maximum pool.I mean to say for minimum pool size should be 1 or any.what is default size of minimum poolsize .as well as for maximum.
I studied documentation but i did not find.can anyone pls clarify my doubt. And can we set pool increment size without set minimum and maximum pool sizes

Thank you

Hello,

Setting of the minimum and maximum pool size depends on the DB usage. You need to check with your application DBA for setting the right value for the minimum and maximum pool size. The default values are 1 and 10 respectively.

Cheers,
Sasanka

You can set the Minimum pool size to ‘0’ which will avoid stale connection being held. But if you have lot of communication that happens with db continuously, you can have minimum as ‘1’ which will reduce the burden of creation of conn object… Maximum pools should be based on the maximum volume of transaction that can hit your environment, and usage of db…

-Senthil

1 Like

FYI in regards to ‘minimum pool size’=1:

I’ve experienced problems with ‘Minimum pool size’=1 on a MySQL db. After some time I think the 1 connection never got released even though MySQL has timed out the connection which causes connection errors next time a DB-request uses the pool. I didn’t pinpoint the settings problem on the MySQL side but I solved this problem by settings ‘Minimum pool size’=0 instead. I’ve mostly used Oracle DB’s and those does not have this problem.

So if you are not sure or want to be more safe, I think using ‘Minimum pool size’=0 would be recommended. You can set a higher ‘block timeout’ and ‘expire timeout’ instead to improve efficiency.

/Hyui

Agreed. Min should be 0. Block and expire timeouts should be increased. The default values are not useful.

Don’t setup high value to Block and expire timeout, It would causes some transactional error.

Agreed that they should be set to something that works well in the environment. 1 second is far too short. 2 hours for block is far too long.

Expire should be set to a value that is a little bit shorter than what the DB uses for its timeout. E.g. if the DB expires an idle connection after 2 hours, the IS JDBC connection pool setting should be 1 hr and 59 minutes.

Block timeout should be a value that you’d like a thread to wait for an available connection before giving up. A few minutes is usually good.