The last packet successfully received from the server was 39,900 milliseconds ago问题解决
1,之前用Mysql或者mycat的时候都没有这个问题。后来改为haproxy+keepalived+mycat后出现这个问题
2,网上查了很多说法,我按照网上说的改了
datasource:
url: jdbc:mysql://192.168.0.206:8067/NOVADB?useUnicode=true&characterEncoding=utf8&serverTimezone=CTT&autoReconnect=true&failOverReadOnly=false
username: root
password: 123456
driver-class-name: com.mysql.jdbc.Driver
# 使用druid数据源
type: com.alibaba.druid.pool.DruidDataSource
druid:
validationQuery: select 1
testWhileIdle: true
testOnBorrow: true
testOnReturn: true
发现还是不行,后来发现修改haproxy的配置
vim /usr/local/haproxy/haproxy.cfg
后来发现把haproxy的timeout server 120000 改大比如120 秒
20190628
后来发现haproxy中几个 参数都要改成120000 才行(具体哪个生效不知道,后续再研究)
并且task的service还是有报错因为没有配置
plan配置了就没有这个报错了
spring:
profiles: prd
application:
name: novaplanserv
datasource:
url: jdbc:mysql://192.168.0.206:8067/NOVADB?useUnicode=true&characterEncoding=utf8&serverTimezone=CTT&autoReconnect=true&failOverReadOnly=false
username: root
password: 123456
driver-class-name: com.mysql.jdbc.Driver
# 使用druid数据源
type: com.alibaba.druid.pool.DruidDataSource
druid:
validationQuery: select 1
testWhileIdle: true
testOnBorrow: true
testOnReturn: true
后来发现
The last packet successfully received from the server was 39,900 milliseconds ago问题解决的更多相关文章
- 【异常】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 ...
- 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 ...
- 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 ...
- 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 ...
- Communications link failure,The last packet successfully received from the server was *** millisecon
使用Connector/J连接MySQL数据库,程序运行较长时间后就会报以下错误: Communications link failure,The last packet successfully r ...
- 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 ...
- 数据库连接超时:“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 49,061,696 millise
解决连接:https://blog.csdn.net/pandajava/article/details/41946251
随机推荐
- CollectionUtils
public class CollectionUtils { /** * 数组是否包含元素 * @param arr * @param str * @return */ public static b ...
- Linux (Ubuntu)安装nexus,搭建maven私有服务器
下载 nexus oos(开源版)https://www.sonatype.com/download-oss-sonatype 2 将下载的压缩包上传到/opt/nexus/文件夹下面 3 解压文件 ...
- Spring Cloud(2):服务发现(Eureka)
Spring Cloud Eureka是Spring Cloud Netflix项目下的一个模块,作用是服务的注册和发现,并实现服务治理.它有一个(或一组,以实现高可用)服务注册中心(eureka s ...
- SpringSecurity快速入门
作者:SingleXu 链接:https://www.jianshu.com/p/8212a559d633 来源:简书 著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出处. 简介 Sp ...
- 记一次排查mysql数据库连接未关闭问题的过程
在一些项目中由于一些特殊原因仍然保留着显示的获取数据库连接(Connection).提交事务.回滚事务.关闭连接等操作:其中关闭连接是比较容易疏忽又比较难在前期发现的问题. 我是如何排查连接未关闭的问 ...
- nexus私服库被误删如何恢复
恢复步骤: 1,登录nexus服务器,找到nexus安装目录(默认/usr/local/下): 2,找到sonatype-work/nexus/trash 下找到你删除的库: 3,copy到指定的so ...
- [bzoj1892][bzoj2384][bzoj1461][Ceoi2011]Match/字符串的匹配_KMP_树状数组
2384: [Ceoi2011]Match 1892: Match 1461: 字符串的匹配 题目大意: 数据范围: 题解: 很巧妙的一道题呀. 需要对$KMP$算法有很深的理解才行. 首先我们需要发 ...
- [转帖]nginx1.17.2版本源码安装
nginx1.17.2版本源码安装 原创: 沧海书生 Ansible爱好者 昨天 公众号里面的内容 这里简单测试了下 在x86的虚拟机里面编译安装 nginx 仅make make install n ...
- 神奇的负margin解决border“合并”
如上图所示,这是一个分页样式,a:hover时,需要改变边框的颜色. 我们知道,除表格之外,其他标签的border是不能合并的.要解决这个问题,思路有三: 1.table布局(大概很少有人愿意在这里使 ...
- 2019年5月份最热门的JavaScript开源项目
五一假期后工作的第一天,不知道你们调整好状态没有呢? 1-libpku https://github.com/lib-pku/libpku Star 15820 该项目是由一名北大在读大学生整 ...