We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
由于我们机器数量比较多,所以很可能在数据库连接保活时间内都没有任何一个请求落到这台机器 上。经常出现Connection无效的情况。 看了下代码,发现似乎在Shrink的时候并没有去check当前最活跃的MinIdle的连接,而是直接删掉余下的连接。 代码为: final int checkCount = poolingCount - minIdle; 事实上,最活跃的那几个MinIdle的连接也可能长期没有连接而失效,我们又不想启用testOnBorrow,所以期望在Shrink中加入以下功能: (1)检查所有的连接(包括最活跃的MinIdle部分),并将无效的全部删除 (2)如果最后删除连接后,余下的连接数<MinIdle,则将重新建立到MinIdle个连接
谢谢
The text was updated successfully, but these errors were encountered:
可以使用testWhileIdle
Sorry, something went wrong.
我们这边已经配置了这个选项,但是就如我所说 testWhileIdle并不会去检测那个最活跃的MinIdle的那几个连接,所以说MinIdle那几个连接还是有可能被对端close掉而失效的。
No branches or pull requests
由于我们机器数量比较多,所以很可能在数据库连接保活时间内都没有任何一个请求落到这台机器 上。经常出现Connection无效的情况。
看了下代码,发现似乎在Shrink的时候并没有去check当前最活跃的MinIdle的连接,而是直接删掉余下的连接。
代码为:
final int checkCount = poolingCount - minIdle;
事实上,最活跃的那几个MinIdle的连接也可能长期没有连接而失效,我们又不想启用testOnBorrow,所以期望在Shrink中加入以下功能:
(1)检查所有的连接(包括最活跃的MinIdle部分),并将无效的全部删除
(2)如果最后删除连接后,余下的连接数<MinIdle,则将重新建立到MinIdle个连接
The text was updated successfully, but these errors were encountered: