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 ...
随机推荐
- debian 7 终端上无法调出输出法
debian 7 终端konsole上无法调出输出法,无法输入汉字的问题解决方案, export GTK_IM_MODULE=fcitxexport QT_IM_MODULE=fcitxexport ...
- JAVA 泛型通配符 ? EXTENDS SUPER 的用法
1. <? extends Hero> ArrayList heroList<? extends Hero> 表示这是一个Hero泛型或者其子类泛型heroList 的泛型可能 ...
- 4-1 R语言函数 lapply
#lapply函数 #可以循环处理列表中的每一个元素 #lapply(参数):lapply(列表,函数/函数名,其他参数) #总是返回一个列表 #sapply:简化结果 #结果列表元素长度均为1,返回 ...
- 一个简单的统计问题(解决方案:Trie树)
题目如图 输入几个不重复的单词和几个前缀,分别统计出单词中包含前缀的个数. Trie树 这个题目用到了 Trie 树.它在百度百科中的定义如下:在计算机科学中,Trie,又称字典树.单词查找树 ...
- Cannot find module 'webpack/lib/node/NodeTemplatePlugin' 问题原因和解决方案
当我配置了html-webpack-plugin 打包时报了这个错,查看了一下package.json发现没有webpack,说明使用了全局安装的webapck,导致的版本差异. 这里在本地安装web ...
- 封装一个统一返回json结果类JsonResult
import java.io.Serializable; public class JsonResult implements Serializable{ private static final l ...
- pom xml testng
<dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId ...
- PAT乙级1001
https://pintia.cn/problem-sets/994805260223102976/problems/994805325918486528 #include<bits/stdc+ ...
- iOS 计算源码行数
如果要统计ios开发代码,包括头文件的,终端命令进入项目目录下,命令如下 1.列出每个文件的行数 find . -name "*.m" -or -name "*.h&qu ...
- 安装luasocket 的正确姿势
在lua中用下面这种方式使用socket,安装luasocket-2.0.2后老是报一些莫名其妙的错误. require("socket") 下面是部分报错信息 lua: erro ...