开发者社区> 问答> 正文

flink连接mysql,在过了一定时间后,就断开连接了

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 52,445,041 milliseconds ago. The last packet sent successfully to the server was 52,445,045 milliseconds ago. is longer than the server configured value of'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, orusing the Connector/J connection property 'autoReconnect=true' to avoid this problem.

flink连接mysql,在过了一定时间后,就断开连接了,设置'autoReconnect=true’也不管用*来自志愿者整理的flink邮件归档

展开
收起
游客sadna6pkvqnz6 2021-12-07 16:42:00 1705 0
1 条回答
写回答
取消 提交回答
  • 如果是mysql5.x以上的版本,url中autoReconnect参数会无效吧,

    可以尝试下修改配置文件wait_timeout/interactive_out参数*来自志愿者整理的flink

    2021-12-07 20:16:38
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Flink CDC Meetup PPT - 龚中强 立即下载
Flink CDC Meetup PPT - 王赫 立即下载
Flink CDC Meetup PPT - 覃立辉 立即下载

相关镜像