HI
链接超时的问题,你后来解决了吗?能告诉下怎么解决的吗?
| |
superainbower
|
|
superainbo...@163.com
|
签名由网易邮箱大师定制


在2020年08月31日 15:57,酷酷的浑蛋<apach...@163.com> 写道:
关键是在sql中怎么设置,connector=jdbc




在2020年08月31日 15:06,13580506953<13580506...@163.com> 写道:
这个问题本质是连接活性问题,
连接数据库超时设置autoReconnect=true(mysql5以上的,设置autoReconnect=true 是无效的 只有4.x版本,起作用)


建议使用连接池druid进行连接活性保持


原始邮件
发件人: 酷酷的浑蛋<apach...@163.com>
收件人: user-zh<user-zh@flink.apache.org>
发送时间: 2020年8月28日(周五) 15:02
主题: flink1.11连接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’也不管用

回复