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问题解决的更多相关文章

  1. 【异常】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 ...

  2. 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 ...

  3. The last packet successfully received from the server was 1,480 milliseconds ago.

    场景:一个上传接口,需要上传几十M的文件,文件中包含10几W的数据,然后对10+W的数据进行同步批量插入,每次批量插入1W.最后返回结果. 项目上线一段时间后,上传接口出现问题,数据库用的MySQL5 ...

  4. 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 ...

  5. 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 ...

  6. Communications link failure,The last packet successfully received from the server was *** millisecon

    使用Connector/J连接MySQL数据库,程序运行较长时间后就会报以下错误: Communications link failure,The last packet successfully r ...

  7. 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 ...

  8. 数据库连接超时:“The last packet successfully received from the server was xxx milliseconds ago”

    产生的原因:应用方的数据库连接有效期时间,大于数据库自己设置的有效期. 解决方案: 一.修改druid配置(如果使用druid的话) spring.datasource.druid.validatio ...

  9. The last packet successfully received from the server was 49,061,696 millise

    解决连接:https://blog.csdn.net/pandajava/article/details/41946251

随机推荐

  1. 用hugo搭建个人博客

    这几天研究了用hugo搭建个人博客. 简单的整理了一下. 1.安装hugo(windows 请查看官网介绍 https://gohugo.io/getting-started/installing/) ...

  2. VBA读写XML文件

    'Write XML file Sub WriteXML(fpa$, fn$) Dim xmlfile As String xmlfile = ThisWorkbook.Path & &quo ...

  3. 图片滚动js代码

          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w ...

  4. ZooKeeper Lead选举

    前段时间学习了zookeeper,对其中比较难理解并且容易忘掉的知识点做一个记录~ 关键词: myId:表示在集群中,自身对应的id zxId:节点状态发生改变时,产生的一个时间戳,并且这个时间戳全局 ...

  5. Mac 配置vscode调试PHP

    Mac系统版本:MacOS Mojave  10.14.5 vscode:1.36.0 MacOS Mojave  10.14.5 系统自带 PHP 7.1.23 1.开启php sudo vim / ...

  6. jsp细节------<base>

    1:jsp一般都有这个<base href="<%=basePath%>">,它的作用一般用不到,但在使用java框架用注解时会用. 如下代码(xxx.js ...

  7. 安装cni网络插件-非必须

    安装cni网络插件 安装cni # 安装 cni # 百度云链接:https://pan.baidu.com/s/1-PputObLs5jouXLnuBCI6Q 密码:tzqm cd /server/ ...

  8. jenkins配置记录

    jenkins配置记录 http://www.cnblogs.com/kevingrace/p/6022447.html

  9. Vue 组件中 data 为什么必须是函数

    原文地址 vue组件中的data必须是函数 类比引用数据类型 Object是引用数据类型,如果不用function 返回,每个组件的data 都是内存的同一个地址,一个数据改变了其他也改变了; jav ...

  10. python字典操作+文件操作+函数

    师从百测besttest今天老牛教了些函数调用的知识,布置了个作业如下: # 1.写一个商品管理的小程序# 2.商品存在文件里面# 1.添加商品# 输入产品名称.颜色.价格# 要校验商品是否存在,价格 ...