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 ...
随机推荐
- WinForm(C/S)项目中使用矢量字体(FontAwsome、Elegant)图标
1.介绍 字体图标在Web应用中最为常见,字体图标是矢量的,矢量图意味着每个图标都能在所有大小的屏幕上完美呈现,可以随时更改大小和颜色,而且不失真.字体图标常见的有Font Awesome和Elega ...
- uni-app小程序(快手)日志打印坑位记录
前情 uni-app是我比较喜欢的跨平台框架,它能开发小程序/H5/APP(安卓/iOS),重要的是对前端开发友好,自带的IDE让开发体验也挺棒的,公司项目就是主推uni-app. 坑位 最近在开发一 ...
- uniapp使用EventBus实现页面间数据传递
前情 最近在做小程序项目,选用是当前比较火的uniapp技术栈,经常会遇到页面间消息传递的需求. 为什么要这么做? uniapp页面间数据通信方式有很多:通过url传参,状态管理库vuex/pinia ...
- dfm格式初解之TTreeView
TTreeView 的 Items.NodeData 值解析: Items.NodeData = { 0302000000200000000000000000000000FFFFFFFFFFFFFFF ...
- 腾讯云携手Commvault,为云上用户提供安全存储服务
11月2日获悉,腾讯云对象存储COS近日正式通过Commvault备份软件标准化测试,并获得官方认证. 同时,Commvault对COS的支持已经从底层打通.这意味着用户只要购买了腾讯云COS的云存储 ...
- aspirate 工具
dotnet tool aspirate https://www.nuget.org/packages/aspirate/0.1.40-preview 作为全局工具安装 dotnet tool ins ...
- CCF中国开源大会,中电金信与行业共探AI技术在金融行业的应用和前景
10月21日,以"开源联合,聚力共赢"为主题的2023 CCF中国开源大会在长沙开幕.中电金信副总经理.研究院院长况文川参加峰会,在"算力与大模型"主题论坛 ...
- k8s pod重启 deployment重启
1.15版本之后可通过kubectl rollout restart deployment -n 命令来实现滚动重启POD 该命令会先创建待用POD,待新POD运行成功后,再关闭原有POD.因此需要保 ...
- Qt编写地图综合应用59-经纬度坐标纠偏
一.前言 地图应用中都涉及到一个问题就是坐标纠偏的问题,这个问题的是因为根据地方规则保密性要求不允许地图厂商使用标准的GPS坐标,而是要用国家定义的偏移标准,或者在此基础上再做算法运算,所以这就出现了 ...
- 11.10javaweb学习