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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With