Flink程序异常--CommunicationsException: The last packet successfully received from the server was
一、异常截图
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 46,912,998 milliseconds ago. The last packet sent successfully to the server was 46,913,003 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.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

二、原因
连接数据库超时
三、解决方法
解决方法1:使用连接池定时刷新服务器时间戳
解决方法2:flink连接mysql时指定autoReconnect=true
即使在创建Mysql时url中加入了autoReconnect=true参数,一但这个连接两次访问数据库的时间超出了服务器端 wait_timeout的时间限制
Flink程序异常--CommunicationsException: The last packet successfully received from the server was的更多相关文章
- Mysql 的异常:The last packet successfully received from the server was 90 milliseconds ago. The last packet sent successfully to the server was 43,603,303 milliseconds ago. is longer than the server con
调试一个程序, 调试到一半, 下班回家, 程序卡在了某一行, 第二天早上回来一看, 发现了异常: Wed Sep :: GMT+: WARN: Establishing SSL connection ...
- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 78,050,512 milliseconds ago.
今天访问已经架上服务器的网站,报错: Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet s ...
- The last packet successfully received from the server was 2,926,157 milliseconds ago. The last packet sent successfully to the server was 2,926,158 milliseconds ago. is longer than the server configured value of 'wait_timeout'. 解决办法
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully rec ...
- 【异常】ser class threw exception: java.sql.SQLException: The last packet successfully received from the server was 39,444 milliseconds ago. The last
1 详细异常 ser class threw exception: java.sql.SQLException: The last packet successfully received from ...
- Communications link failure,The last packet successfully received from the server was *** millisecon
使用Connector/J连接MySQL数据库,程序运行较长时间后就会报以下错误: Communications link failure,The last packet successfully r ...
- The last packet successfully received from the server was 20,519 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago.
本地升级了下MySQL的版本,从5.6升为5.7,数据文件直接拷贝的,项目查询数据库报错: Could not retrieve transation read-only status server ...
- The last packet successfully received from the server was 1,480 milliseconds ago.
场景:一个上传接口,需要上传几十M的文件,文件中包含10几W的数据,然后对10+W的数据进行同步批量插入,每次批量插入1W.最后返回结果. 项目上线一段时间后,上传接口出现问题,数据库用的MySQL5 ...
- mysql dbcp Caused By: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy ...
- 数据库连接超时:“The last packet successfully received from the server was xxx milliseconds ago”
产生的原因:应用方的数据库连接有效期时间,大于数据库自己设置的有效期. 解决方案: 一.修改druid配置(如果使用druid的话) spring.datasource.druid.validatio ...
- The last packet successfully received from the server was 39,900 milliseconds ago问题解决
1,之前用Mysql或者mycat的时候都没有这个问题.后来改为haproxy+keepalived+mycat后出现这个问题 2,网上查了很多说法,我按照网上说的改了 datasource: url ...
随机推荐
- Python:编程“八荣八耻”之我见
刚在逛CPyUG时看到了个主题讨论python的八荣八耻,见:http://bit.ly/4jeBor, 主题内容如下: 以动手实践为荣,以只看不练为耻. 以打印日志为荣,以单步跟踪为耻. 以空白 ...
- VSCode关于编译scss的插件
先安装两个插件,live server和 live sass compiler两个插件 然后将下面的代码复制到设置(文件---首选项----设置----打开设置json)中 "liveSas ...
- Java Class 文件中Method的存储
class文件是java编译后的文件类型.其代表一个类,其有专门的存储格式.其中会存放数据也会存放方法,而所谓的方法存放就是将方法中的调用都转换成java字节码指令.所方法调用从机器的角度看就是对于寄 ...
- 药企如何实现ERP系统与CRM系统的整合
ERP系统与CRM系统整合的意义深远,对于企业尤其是药企来说,这种整合能够带来多方面的优势和改进.可以确保企业内部数据的一致性和准确性:优化业务流程.增强决策支持:从而提高企业的整体运营效率和市场竞争 ...
- Postman 汉化教程
Postman 汉化教程(Postman中文版) 迷恋自留地 postman官网下载地址 https://www.postman.com/downloads/ postman汉化包 https://g ...
- uni-app小程序(快手)日志打印坑位记录
前情 uni-app是我比较喜欢的跨平台框架,它能开发小程序/H5/APP(安卓/iOS),重要的是对前端开发友好,自带的IDE让开发体验也挺棒的,公司项目就是主推uni-app. 坑位 最近在开发一 ...
- GooseFS 在云端数据湖存储上的降本增效实践
| 导语 基于云端对象存储的大数据和数据湖存算分离场景已经被广泛铺开,计算节点的独立扩缩容极大地优化了系统的整体运行和维护成本,云端对象存储的无限容量与高吞吐也保证了计算任务的高效和稳定.然而,云 ...
- less 常用方法
介绍 Less 是 CSS 的预处理语言之一,为 CSS 增添了变量.Mixin.函数等特性,使CSS更易于维护扩展. 嵌套(Nesting) .header { .navgation: { font ...
- PDFsharp 1.50
PDFsharp 1.50 Preview Information - PDFsharp & MigraDoc PDFShapr 1.50 修复与改进 支持 Object Streams - ...
- 中电金信新捷报:银行客户资源管理领域No.1
春暖花开,捷报频传 近日,中电金信 客户关系管理系统(CRM) 接连中标 让我们共同见证这波喜讯 01 中电金信凭借优秀的解决方案和丰富的服务案例经验,成功中标某全国性股份制银行同业CRM实施服务采购 ...