mycat->oracle報java.sql.SQLException: 無法從套接字讀取更多的數據


今天下午,測試環境運行的時候又出現了之前的一個異常,這次把錯誤信息全部打出來了,java.sql.SQLException: 無法從套接字讀取更多的數據,是使用mycat連接oracle的,如下所示:

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之后,心跳就沒發了,如下:

重啟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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM