jdbc链接close的时候偶尔会报这么个异常

hzwei206 发布于 2014/07/02 09:29
阅读 3K+
收藏 0
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

偶尔出现这个异常。可能是网络不通畅?


加载中
0
叫我刀刀
叫我刀刀
可能有人重启数据库了? 
0
开源中国驻联合国理事
开源中国驻联合国理事
网络不通畅,延时比较长
0
_Leo_
_Leo_

如果在局域网中不能连接外网解析DNS的,mysql连接时超级慢的,那么你需要修改配置

vi /etc/my.cnf

添加下面:

[mysqld]
skip-name-resolve

返回顶部
顶部