Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

initializationFailTimeout property in HikariCP

From Github:

Any positive number is taken to be the number of milliseconds to attempt to acquire an initial connection; the application thread will be blocked during this period. Default: 1

I understand when using default value if connection is not obtained within 1 sec then error will be thrown .I am planning to set the value as 1000 ms as sometimes I am getting the error as

"hikaripool$poolinitializationexception"

when starting the spring boot Java 8 app. Is this the correct approach?

like image 802
hello world Avatar asked Sep 01 '25 10:09

hello world


1 Answers

Not exactly it wait for connection connectTimeout + initializationFailTimeout , from github:

This timeout is applied after the connectionTimeout period

Which is by default half a minute

Default: 30000 (30 seconds)

You can enter -1 value to allow pool to start without failing

A value less than zero will bypass any initial connection attempt, and the pool will start immediately while trying to obtain connections in the background

like image 191
user7294900 Avatar answered Sep 03 '25 09:09

user7294900