Flink cdc代码的方式结合mybatis读mysql运行一段时间报连接数据库超时的问题怎么解决

请教大佬们,Flink cdc代码的方式结合mybatis读mysql运行一段时间总是报连接数据库超时的问题: org.apache.ibatis.exceptions.PersistenceException:

Error querying database. Cause: com.mysql.cj.jdbc.exceptions.CommunicationsException: The last packet successfully received from the server was 94,894,842 milliseconds ago. The last packet sent successfully to the server was 94,894,842 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, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.

展开
收起
wenti 2023-02-06 15:21:34 553 发布于云南 分享
分享
版权
举报
1 条回答
写回答
取消 提交回答
  • GitHub https://github.com/co63oc/cloud

    提示增加选项autoReconnect=true

    2023-02-11 17:19:05 举报
    赞同 评论

    评论

    全部评论 (0)

    登录后可评论

实时计算Flink版是阿里云提供的全托管Serverless Flink云服务,基于 Apache Flink 构建的企业级、高性能实时大数据处理系统。提供全托管版 Flink 集群和引擎,提高作业开发运维效率。

收录在圈子:
实时计算 Flink 版(Alibaba Cloud Realtime Compute for Apache Flink,Powered by Ververica)是阿里云基于 Apache Flink 构建的企业级、高性能实时大数据处理系统,由 Apache Flink 创始团队官方出品,拥有全球统一商业化品牌,完全兼容开源 Flink API,提供丰富的企业级增值功能。
还有其他疑问?
咨询AI助理