beecp icon indicating copy to clipboard operation
beecp copied to clipboard

运行一段时间后会报错org.stone.beecp,pool.exception

Open ghx577 opened this issue 1 year ago • 4 comments

报了如下错误: 网络和数据库都是正常的。 Failed to obtain uDec Connection, nested exception is org.stone.beecp,pool.exception.Connectiol CreateException. wait timeout on pool lock acquistion image

版本 <groupId>com.github.chris2018998</groupId> <artifactId>beecp-spring-boot-starter</artifactId> 1.8.5 配置: 255bedcf18ce1f19088a6b99340cce6

ghx577 avatar Jul 09 '24 02:07 ghx577

池内的默认等待超时间是8秒,借用线程8秒没有获得锁导致超时,有一个借用线程应该卡在Driver.getConnection上了。中断线程应该可以让借用线程退出,会得到一个中断异常。BeeCP中断方式有两种:手工中断(调用BeeDataSource.interruptOnCreate);自动中断(下一版本发布),内部扫描线程会自动检测是否有借用线程被卡了,如果超过8秒会强制中断。尽管有中断措施,但是还是需要多检查一下网络和数据库

Chris2018998 avatar Jul 09 '24 05:07 Chris2018998

加一个网路超时参数试试。

connectProperties: oracle.net.CONNECT_TIMEOUT=8000

image

Chris2018998 avatar Jul 09 '24 23:07 Chris2018998

好的,我试下改下配置

ghx577 avatar Jul 11 '24 01:07 ghx577

新版已发布,欢迎试试

Chris2018998 avatar Jul 14 '24 15:07 Chris2018998