jdbc链接close的时候偶尔会报这么个异常
2014-07-02 09:11:44,325 [Druid-ConnectionPool-Destory-33459432] ERROR - close connection error [com.alibaba.druid.util.JdbcUtils.close(JdbcUtils.java:84)] java.sql.SQLRecoverableException: IO 错误: Socket read timed out at oracle.jdbc.driver.T4CConnection.logoff(T4CConnection.java:587) at oracle.jdbc.driver.PhysicalConnection.close(PhysicalConnection.java:4011) at com.alibaba.druid.filter.FilterChainImpl.connection_close(FilterChainImpl.java:169) at com.alibaba.druid.filter.FilterAdapter.connection_close(FilterAdapter.java:776) at com.alibaba.druid.filter.logging.LogFilter.connection_close(LogFilter.java:415) at com.alibaba.druid.filter.FilterChainImpl.connection_close(FilterChainImpl.java:165) at com.alibaba.druid.filter.stat.StatFilter.connection_close(StatFilter.java:254) at com.alibaba.druid.filter.FilterChainImpl.connection_close(FilterChainImpl.java:165) at com.alibaba.druid.filter.FilterAdapter.connection_close(FilterAdapter.java:776) at com.alibaba.druid.filter.FilterChainImpl.connection_close(FilterChainImpl.java:165) at com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl.close(ConnectionProxyImpl.java:115) at com.alibaba.druid.util.JdbcUtils.close(JdbcUtils.java:82) at com.alibaba.druid.pool.DruidDataSource.shrink(DruidDataSource.java:1915) at com.alibaba.druid.pool.DruidDataSource$DestroyConnectionThread.run(DruidDataSource.java:1733) Caused by: oracle.net.ns.NetException: Socket read timed out at oracle.net.ns.Packet.receive(Packet.java:347) at oracle.net.ns.DataPacket.receive(DataPacket.java:106) at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:324) at oracle.net.ns.NetInputStream.read(NetInputStream.java:268) at oracle.net.ns.NetInputStream.read(NetInputStream.java:190) at oracle.net.ns.NetInputStream.read(NetInputStream.java:107) at oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:124) at oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:80) at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1137) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:350) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:227) at oracle.jdbc.driver.T4C7Ocommoncall.doOLOGOFF(T4C7Ocommoncall.java:61) at oracle.jdbc.driver.T4CConnection.logoff(T4CConnection.java:574) ... 13 more
偶尔出现这个异常。可能是网络不通畅?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果在局域网中不能连接外网解析DNS的,mysql连接时超级慢的,那么你需要修改配置
vi /etc/my.cnf
添加下面:
[mysqld]
skip-name-resolve
网络不通畅,延时比较长
可能有人重启数据库了?