JDBC communication link failure after some time

2019-05-31 17:02发布

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条回答
SAY GOODBYE
2楼-- · 2019-05-31 18:01

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

con.setConnectionTimeout(X);
查看更多
登录 后发表回答