Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Default maximumPoolSize for HikariCP

What is the default connection pool size that spring boot HikariCP provides when the container loads?

of course, I am using below properties to setup max cp size, but I was wondering what is the default CP size if we don't give any number in the application.properties file.

spring.datasource.hikari.minimumIdle=5 spring.datasource.hikari.maximumPoolSize=20 spring.datasource.hikari.idleTimeout=30000 spring.datasource.hikari.poolName=SpringBootJPAHikariCP spring.datasource.hikari.maxLifetime=2000000 spring.datasource.hikari.connectionTimeout=30000 

And if I give a max pool size in application.properties as 100 and I use only 20, will that affect my application performance?

like image 973
Hari Avatar asked Mar 06 '19 15:03

Hari


People also ask

What is default Hikari pool size?

Description. Generic defaults. spring.datasource.hikari.maximum-pool-size=50. Specifies number of database connections between database and application. This property controls the maximum size that the pool is allowed to reach, including both idle and in-use connections.

What is the default connection timeout for Hikari?

connectionTimeout=30000 spring. datasource. hikari. idleTimeout=600000 spring.

What is the default connection pool size in spring boot?

You can still configure it by increasing the max connections (the default is 10 for instance).

What is leak detection threshold HikariCP?

From Hikari documentation: "This property controls the amount of time that a connection can be out of the pool before a message is logged indicating a possible connection leak. A value of 0 means leak detection is disabled. Lowest acceptable value for enabling leak detection is 2000 (2 seconds).


1 Answers

maximumPoolSize

Default: 10

HicariCP Documentation contains default properties: https://github.com/brettwooldridge/HikariCP

Read about Pool Size here: Maximum Connection Pool Size

like image 114
Dmitry Krivolap Avatar answered Sep 18 '22 12:09

Dmitry Krivolap