JDBC communication link failure after some time

落花浮王杯 提交于 2019-12-23 01:35:16

问题


I am using JDBC with proxool connection pool to connect to mysql DB. I am selecting large number of rows from multiple threads and after some time i get an error saying communication link failure, Last packet sent to the server was ...ago. I am closing connection,statement,resultSet in every thread. The fetching time increases gradually and the exception occurs after 5-10 minutes. I doubt it is a memory leak, but cant find any clue.

Please let me know the possible reasons.

Thanks, Kaka


回答1:


it may related on your Connection Timeout, try to increase it.

con.setConnectionTimeout(X);


来源:https://stackoverflow.com/questions/3350576/jdbc-communication-link-failure-after-some-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!