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 successfully received from the server was 78,050,512 milliseconds ago.
The last packet sent successfully to the server was 78,050,512 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.
翻译过来:上次访问时,发送的包已经多少多少秒了,比设置的‘wait_timeout’要长,建议修改 autoReconnect=true。 解决方案:
修改或添加三个参数:
将testConnectionOnCheckout 设为 false
将testConnectionOnCheckin 设为 true
将idleConnectionTestPeriod 设为 ,这个数字要根据项目情况设定,比8小时小就好
具体原理参考:https://blog.csdn.net/frankcheng5143/article/details/50589264
Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 78,050,512 milliseconds ago.的更多相关文章
- 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 ...
- com.mysql.jdbc.exceptions.jdbc4.CommunicationsException/com.atomikos.datasource.ResourceException异常解决
tomcat+mysql部署,每天早晨第一次访问web项目,出现mysql的连接timeout异常:com.mysql.jdbc.exceptions.jdbc4.CommunicationsExce ...
- 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 ...
- mysql 数据库问题com.mysql.jdbc.exceptions.jdbc4.CommunicationsException
本文转自:http://blog.csdn.net/zmzsoftware/article/details/6835604 MySQL第二天早上第一次连接超时报错,解决方法com.mysql.jdbc ...
- com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure 数据库报错
-- 查询mysql 数据库链接空闲时间持有最大空闲时间,单位为秒 SHOW VARIABLES WHERE VAriable_name = 'interactive_timeout'; -- 会出现 ...
- 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 ...
- 异常解决:Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
异常描述 这个异常通常有如下信息: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failu ...
- Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
很长的报错,截取 ERROR c.a.d.p.DruidDataSource - discard connection com.mysql.jdbc.exceptions.jdbc4.Comm ...
- Caused by: java.net.ConnectException: Connection refused/Caused by: java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
1.使用sqoop技术将mysql的数据导入到Hive出现的错误如下所示: 第一次使用命令如下所示: [hadoop@slaver1 sqoop--cdh5.3.6]$ bin/sqoop impor ...
随机推荐
- 1208. [HNOI2004]宠物收养场【平衡树-splay】
Description 最近,阿Q开了一间宠物收养所.收养所提供两种服务:收养被主人遗弃的宠物和让新的主人领养这些宠物.每个领养者都希望领养到自己满意的宠物,阿Q根据领养者的要求通过他自己发明的一个特 ...
- [CEOI2017]Building Bridges
题目 斜率优化思博题,不想写了 之后就一直\(95\)了,于是靠肮脏的打表 就是更新了一下凸壳上二分斜率的写法,非常清爽好写 就当是挂个板子了 #include<algorithm> #i ...
- Day5 类和对象
面向对象编程OOP 类:相似对象的集合. 对象 对象:实体.一切可以被描述的事物. 属性:特征. 方法:动作,行为. 类和对象的区别 [1]类时抽象的,对象是具体的. [2]类是一个模板,创建出来的对 ...
- 基于swoole的聊天室模型
client.html: <!doctype html><html><head> <meta charset="utf-8"> &l ...
- 多线程之ThreadLocal(转)
相信读者在网上也看了很多关于ThreadLocal的资料,很多博客都这样说:ThreadLocal为解决多线程程序的并发问题提供了一种新的思路:ThreadLocal的目的是为了解决多线程访问资源时的 ...
- python-文件基本操作(一) (转载)
转载自: https://www.cnblogs.com/nizhihong/p/6528439.html 一.打开文件的方法: 注意:file()和open()基本相同,且最后要用close()关闭 ...
- 权限管理系统---django版本
权限管理:在简单的系统中,以往都是将每个权限赋予给用户,每个用户访问某个功能,通过查询db来判断用户是否有权限.但是如下情景不能够解决: 1.随着系统的复杂,权限较为复杂的时候,权限条目也多,系统角色 ...
- 三星S5-PV210内存初始化
一.S5PV210时钟系统 时钟:一定频率的电信号. 时钟系统:基于CMOS工艺的高性能处理器时钟系统,集成PLL可以从内部触发,比从外部触发更快且更准确,能有效地避免一些与信号完整性相关的问题. ...
- 大数据入门第一天——基础部分之Linux基础(环境准备与先导知识)
一.Linux环境安装 1.VM的安装 参考Linux环境搭建随笔:http://www.cnblogs.com/jiangbei/p/7248054.html 2.CentOS的安装 同参考上述随笔 ...
- 2017-2018-2 《网络对抗技术》 20155322 Exp 5 MSF基础应用
[-= 博客目录 =-] 1-实践目标 1.1-实践介绍 1.2-实践内容 1.3-实践要求 2-实践过程 2.1-情报收集 2.2-主动攻击实践-ms08_067 2.3-浏览器攻击实践-many* ...