oracle 无法套取,mycat->oracle报java.sql.SQLException: 无法从套接字读取更多的数据

今天下午,测试环境运行的时候又出现了之前的一个异常,这次把错误信息全部打出来了,java.sql.SQLException: 无法从套接字读取更多的数据,是使用mycat连接oracle的,如下所示:

ad51053570ef686757379e92555ea0f2.png

ORA-17410: No more data to read from socket

Your database connection has timed out, either due to network problems or due to Oracle reaching the IDLE_TIME profile limit.

Your application however tried to use the connection, but as the connection has closed, failed to do so.

This error mostly happens when using connection pools. Normally, when a connection is timed out or gone, the application should automatically reconnect.

Failure to do so results in this error.

经查,oracle后台以及alert.log没有任何异常,也不应该是oracle jdbc驱动的问题,trace文件也没有异常。

看了下mycat.log,13:00之后,心跳就没发了,如下:

00c21048a7647971b7188d5ca656aee1.png

重启mycat之后,应用没有重启,再次运行,就没有这个问题了(所以原因无非是:1、网络负载太高、超时;2、oracle服务器刚好重启、但是未超过jdbc连接池的空闲重试,于是第一次执行的时候出现该异常;3、驱动层使用有问题。屡试不爽)。之前也是,mycat经常遇到各种奇葩问题,因为我们是两台虚拟机,不排除网络不稳定,但是都没有解决方案。看下用的是dataHost的连接数都很大,应该不是这个问题,只有三个心跳日志是因为配置了三个dataHost。

不过我们已经打算切换sharding-jdbc了。

参考:

https://blog.csdn.net/liduote/article/details/70227040

https://blog.csdn.net/sinat_33517300/article/details/78968181

http://www.iteye.com/problems/38600

https://blog.csdn.net/xiaopeng187/article/details/25797885

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值