一是将

wait_timeout=31536000

interactive_timeout=31536000

将过期时间修改为1年。

二是在连接URL上添加参数:&autoReconnect=true&failOverReadOnly=false

Communications link failure due to underlying exception: ** BEGIN NESTED EXC的更多相关文章

  1. 解决MySQL连接超时Communications link failure due to underlying exception

    最近在用一个MySQL的Java连接池的过程中,连接一晚上不释放,第二天就会造成超时的错误,查了一下原因,原来是因为MySQL默认的空闲等待时间是8个小时,一旦空闲超过8个小时,就会抛出异常.异常文本 ...

  2. Communications link failure due to underlying exception异常处理(转)

    最近的一个项目在Hibernate使用C3P0的连接池,数据库为Mysql.开发测试没有问题,在运行中每个一段长的空闲时间就出现异常: java 代码 org.hibernate.exception. ...

  3. 解决mysql连接异常—-com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception

    DBCP连接池连接MySql数据库时,一奇葩数据库设置为30秒内无请求自动断开.超时后链接无法关闭,活动链接数飞奔,最后挂掉. 网上找了一圈,一般是这三种,方法一pass,方法二测试无效可能设置错了吧 ...

  4. SSH项目过一段时间之后再访问会报一次Could not open Hibernate session for transaction 异常,Caused by: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlyi,再重新方法即可访问成功(通常出现在过了一晚之后再去访问系统)

    前端时间到客户那去进行项目的上线测试,将项目部署好之后,运行都是正常的,可是每到了第二天早上访问的时候,就会报一个Could not open Hibernate session for transa ...

  5. Communications link failure报错的处理

    一.报错的问题: 测试环境在做压力测试的时候爆出错误 com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications l ...

  6. 【错误】:Could not open JDBC Connection for transaction; nested exception is: Communications link failure;The last packet sent successfully to the server was 1 milliseconds ago

    # #错误日志 2016-11-10 16:19:20,834 ERROR [org.quartz.core.JobRunShell] - Job DEFAULT.jobtask threw an u ...

  7. 异常-ERROR yarn.ApplicationMaster: User class threw exception: java.sql.SQLException: Communications link failure

    1 详细异常信息 ERROR yarn.ApplicationMaster: User class threw exception: java.sql.SQLException: Communicat ...

  8. com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure 解决办法

    09:00:30.307 [http-8080-6] ERROR org.hibernate.transaction.JDBCTransaction -JDBC begin failed com.my ...

  9. Oozie时出现Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure?

    不多说,直接上干货! 问题详情 [hadoop@bigdatamaster oozie--cdh5.5.4]$ bin/ooziedb.sh create -sqlfile oozie.sql -ru ...

随机推荐

  1. mysql基础指令知识

    桌面指令(cmd)进入mysql客户端 第一步:安装mysql,配置环境变量 第二步:手动开启服务 第三步:输入如下指令: mysql [-h localhost -P 3306] -u  用户名 - ...

  2. IDEA设置项目文件自动Add到Svn/Git

    1)配置自动Add 2)将未添加的文件添加到本地 3)取消已经添加的文件

  3. Mongodb3.6 Replica Set 配置

    单机下执行: /usr/local/mongodb/bin/mongod --dbpath /usr/local/mongodb/r1 --port --replSet myset /usr/loca ...

  4. WIN10笔记本屏幕亮度无法调节,一直是最高亮度

    WIN+X,选择"计算机管理"; 系统工具->设备管理器->找到右边的"显示适配器"->右键先禁用,再启动下图设备

  5. 51nod 2488 矩形并的面积

    在二维平面上,给定两个矩形,满足矩形的每条边分别和坐标轴平行,求这个两个矩形的并的面积.即它们重叠在一起的总的面积. 收起   输入 8个数,分别表示第一个矩形左下角坐标为(A,B),右上角坐标为(C ...

  6. CSS 相邻元素选择器

    相邻兄弟选择器(Adjacent sibling selector)可选择紧接在另一元素后的元素,且二者有相同父元素.选择相邻兄弟 如果需要选择紧接在另一个元素后的元素,而且二者有相同的父元素,可以使 ...

  7. Java - 框架之 SSH 整合

                        代码获取 十四. ssh 整合1 - 包 1. Struts jar 包    - Struts-2.xx\apps\stutrs2-blank\WEB-INF ...

  8. 2019 icpc 徐州 解题报告

    A.Cat 题库链接 给定区间[l,r],求一个最长子区间,使得区间异或和小于等于s,(结论)偶数和偶数后三个数的异或和等于0 #include <bits/stdc++.h> using ...

  9. loj #6485. LJJ 学二项式定理 单位根反演

    新学的黑科技,感觉好nb ~ #include <bits/stdc++.h> #define ll long long #define setIO(s) freopen(s". ...

  10. Jenkins 通过 maven 构建编译 JAVA 项目环境

    Jenkins 通过maven 构建编译 JAVA 项目环境 官网下载合适Jenkins版本包: 1.jenkins http://mirrors.jenkins.io/war-stable/ 2.J ...