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 ...
随机推荐
- 深入 Java 调试体系: 第 1 部分,初探JPDA 体系
JPDA(Java Platform Debugger Architecture)是 Java 平台调试体系结构的缩写,通过 JPDA 提供的 API,开发人员可以方便灵活的搭建 Java 调试应用程 ...
- Joinpoint继承体系-笔记
Joinpoint继承层次图: 由上图可以知道的所有的接口的实现都在ReflectiveMethodInvocation这个类中.ConstructorInvocation接口只有一个方法,这个方法的 ...
- VS中生成、清理项目、调试、開始运行(不调试)、Debug 和 Release等之间的差别
版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/helloUSB2010/article/details/35802437 一.生成和又一次生成 &q ...
- memcached迁移方案——记一次memcached session服务的迁移
背景: (1)由于机房调整,需要迁移memcached: (2)需要在短期内迁移完成(一周以内): (3)该memcached 保存了用户的登录数据,非常重要,一旦出问题将导致大量的用户被踢出: (4 ...
- Python自动化之复习基础
用户在命令行输入的参数可以在sys.argv里面看到,并且是以列表的形式现实的
- c++——inline内联函数
1 inline内联函数 C++中的const常量可以替代宏常数定义,如: const int A = 3; #define A 3 C++中是否有解决方案替代宏代码片段呢?(替代宏代码片段就可以 ...
- 关于NRF52832能否被替代的详解
ULP无线系统级芯片 nRF52832是用于ULP无线应用的功能强大的多协议单芯片解决方案.它结合了业界性能最佳的Nordic最新无线收发器.ARM Cortex M4F CPU和512kB闪存及64 ...
- Maven/Ant的安装(Win10 x64)
一.Maven安装 1.官网下载安装包,http://maven.apache.org/download.cgi. 2.安装包解压到某一目录,然后配置maven的环境变量. PS:也可以不配置环境变量 ...
- Jmeter不同线程组之间的变量引用
用过LoadRunner的小伙伴应该知道,它的脚本主要分为三个部分,即Login,Action,End三个模块.Login中一般是“初始化”环境所用,而Action模块主要做一些诸如压测的动作.举个例 ...
- HDU 2639(01背包求第K大值)
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=2639 Bone Collector II Time Limit: 5000/2000 MS (Jav ...