Open LesterDong opened 6 years ago
这儿是服务器的问题,不对druid的问题
@wenshao 大神 这个大概什么问题 怎么解决呢 可否指点一下
@wenshao 我看了#870,根据我查找的其他资料应该是这个问题,oracle服务端配置的CONNECT_TIME=60,就是服务端允许的物理连接最长是60分钟,druid配置了testWhileIdle=true和timeBetweenEvictionRunsMillis=600000,validationQuery=select 1 from dual ,感觉这个只能起到检查连接是否是活的这样的作用。现在可以确定被服务端强制关闭的连接一定是一直在应用端被使用而没有被回收,现在想知道什么办法能实现连接在配置了超时时间后必须强制回收?druid某个参数可以达到这个效果么?请大神能够指点下 感激!
程序中报数据库的异常,错误栈如下: java.sql.SQLException: ORA-01012: not logged on
-- at com.chinagpay.notifyer.listener.NotifyMerListener$1.run(NotifyMerListener.java:78) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
经排查,发现有另外一个异常: SQL []; ORA-02399: exceeded maximum connect time, you are being logged off ; nested exception is java.sql.SQLException: ORA-02399: exceeded maximum connect time, you are being logged off ,我在想是不是连接池中某些连接在调用时发现oracle服务端已经将该连接物理关闭了,但是在druid连接池中还是alived,druid参数配置如下: `