gpt4 book ai didi

spring-boot - HikariCP 中的 initializationFailTimeout 属性

转载 作者:行者123 更新时间:2023-12-04 07:21:38 28 4
gpt4 key购买 nike

来自 Github:

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

我理解如果在 1 秒内未获得连接则使用默认值时将抛出错误。我计划将该值设置为 1000 毫秒,因为有时我会收到错误

"hikaripool$poolinitializationexception"

启动 spring boot Java 8 应用时。这是正确的做法吗?

最佳答案

不完全是等待连接 connectTimeout + initializationFailTimeout ,来自 github :

This timeout is applied after the connectionTimeout period

默认是半分钟

Default: 30000 (30 seconds)

您可以输入 -1 值以允许池启动而不会失败

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

关于spring-boot - HikariCP 中的 initializationFailTimeout 属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68454461/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com