场景:一个上传接口,需要上传几十M的文件,文件中包含10几W的数据,然后对10+W的数据进行同步批量插入,每次批量插入1W.最后返回结果. 项目上线一段时间后,上传接口出现问题,数据库用的MySQL5.7.21,报了如下错误: 2018-07-16 01:30:03.497 ERROR com.alibaba.druid.pool.DruidDataSource Line:1594 - discard connection com.mysql.jdbc.exceptions.jdbc4.Comm…
本地升级了下MySQL的版本,从5.6升为5.7,数据文件直接拷贝的,项目查询数据库报错: Could not retrieve transation read-only status server The last packet successfully received from the server was 20,519 milliseconds ago.  The last packet sent successfully to the server was 0 milliseconds…
1 详细异常 ser class threw exception: java.sql.SQLException: The last packet successfully received from the server was 39,444 milliseconds ago. The last packet sent successfully to the server was 39,444 milliseconds ago. is longer than the server configu…
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=fals…
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: 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 t…
今天访问已经架上服务器的网站,报错: 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.…
使用Connector/J连接MySQL数据库,程序运行较长时间后就会报以下错误: Communications link failure,The last packet successfully received from the server was * **millisecond ago. The last packet successfully sent to the server was * **millisecond ago. 其中错误还会提示你修改wait_timeout或是使用C…
调试一个程序, 调试到一半, 下班回家, 程序卡在了某一行, 第二天早上回来一看, 发现了异常: Wed Sep :: GMT+: WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be establis…
产生的原因:应用方的数据库连接有效期时间,大于数据库自己设置的有效期. 解决方案: 一.修改druid配置(如果使用druid的话) spring.datasource.druid.validationQuery=select 1 spring.datasource.druid.testWhileIdle=true spring.datasource.druid.testOnBorrow=true spring.datasource.druid.testOnReturn=true PS.此方案对…
解决连接:https://blog.csdn.net/pandajava/article/details/41946251…
原文地址:http://nkcoder.github.io/blog/20140712/mysql-reconnect-packet-lost/ 1.1 错误信息: Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 20,820,001 milliseconds ago. The last pac…
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="${jdbc.driverClassName}" /> <property name="url&quo…
mysql 8小时问题的解决方法 转发: 别看是英文 ,写的很好 ,才转 Use Hibernate + MYSQL database development, link timeout problem: com.mysql.jdbc.CommunicationsException: The last packet successfully received from the server was58129 seconds ago.The last packet sent successfull…
参考: 系统太慢,实在搞不清是哪里的问题,祭出重装大法 需要安装的工具还真多,先装主要的吧.VS2013, SQL SERVER 2012,搞定.. 连个数据库试试,出错了: A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The message re…
c# 使用MS SqlServer,连接成功,但是还报异常A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0.... 操作系统安装了net framework 4.5.1,出现上述情况 解决方案:安装net framework 4.5.2以上框架…
情况:WCF服务在浏览器中可以正常浏览,但是通过程序调用提示: HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'NTLM'. 详细错误信息: System.ServiceModel.Security.MessageSecurityException: The HTTP request…
答: 直接将https修改为http即可, 如: $ git clone https://github.com/Jello_Smith/my-example.git ->  git clone http//github.com/Jello_Smith/my-example.git…
程序一直报这个错误 [getui-server][ERROR] [2016-03-17 10:50:00] getui.task.HftMongoInfoTask.execute(137) | --HftMongoInfoTask-error-org.springframework.dao.RecoverableDataAccessException: PreparedStatementCallback; SQL [select mid from test_info where cid = 9]…
Mysql占用CPU过高的时候,该从哪些方面下手进行优化?占用CPU过高,可以做如下考虑:1)一般来讲,排除高并发的因素,还是要找到导致你CPU过高的哪几条在执行的SQL,show processlist语句,查找负荷最重的SQL语句,优化该SQL,比如适当建立某字段的索引:2)打开慢查询日志,将那些执行时间过长且占用资源过多的SQL拿来进行explain分析,导致CPU过高,多数是GroupBy.OrderBy排序问题所导致,然后慢慢进行优化改进.比如优化insert语句.优化group by…
最近准备把一千九百多万数据导入Solr中,在以前测试数据只有一两百万,全量导入没有任务问题.但是,换成一千九百万数据时,solr报内存异常(java.lang.OutOfMemoryError:GC overhead limit exceeded),整个tomcat无法使用.我发现,我给tomcat最大堆内存512M.我觉得,可能是内存过小,于是,我把内存改大些,1024M(set JAVA_OPTS=-server -Xms1024m -Xmx1024m -XX:PermSize=128M -…
一.报错的问题: 测试环境在做压力测试的时候爆出错误 com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure INFO | jvm 1 | 2013/10/24 14:22:28 | INFO | jvm 1 | 2013/10/24 14:22:28 | The last packet successfully received from the server was 26,071…
异常描述 这个异常通常有如下信息: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet successfully received from the server was 59,977 milliseconds ago. The last packet sent successfully to the server was 1 millisecon…
生产环境连接池TestOnBorrow设置为false,导致有时获取的连接不可用.分析如下: TestOnBorrow=false时,由于不检测池里连接的可用性,于是假如连接池中的连接被数据库关闭了,应用通过连接池getConnection时,都可能获取到这些不可用的连接,且这些连接如果不被其他线程回收的话,它们不会被连接池被废除,也不会重新被创建,占用了连接池的名额. The last packet successfully received from the server was 19,95…
很长的报错,截取   ERROR c.a.d.p.DruidDataSource - discard connection   com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure       The last packet successfully received from the server was 44,866 milliseconds ago. The last pac…
背景 症状 排查 修复 背景 最近在陆续做机房升级相关工作,配合DBA对产线数据库链接方式做个调整,将原来直接链接读库的地址切换到统一的读负载均衡的代理 haproxy 上,方便机柜和服务器的搬迁. 切换之后线上时不时的会发生 discard connection 错误,导致程序报 500 错误,但不是每次都必现的. 开发框架: spring boot+mybatis+druid+shardingJDBC 网络架构: appserver->mysql(master) 写 appserver->…
centos7环境配置haproxy实现mysql数据库代理 我们通常会碰到这样的业务场景: b主机和c数据库在同一个内网,a主机不能直接访问c数据库,我们可以通过在b主机上搭建代理让a访问c数据库,我们使用haproxy来干这个事情 安装haproxy yum install -y haproxy 配置haproxy: vim /etc/haproxy/haproxy.cfg global     log         127.0.0.1 local2     chroot      /va…
1. 选择哪种transaction manager?      在单数据源情况下,JDBC,Hibernate,ibatis等自带的 transaction manager已能用于处理事务.     但当设计多种数据源的事务处理时,上面的transaction manager就没法用了.这个时候可选事务管理组件有:Bitronix,SimpleJTA,Tyrex (dead?), JOTM (used in Jonas),GeronimoTM/Jencks (used in Geronimo)…
atomikos + druid 连接超时失效,需要多次连接才能成功. 首次连接会报异常: 2018-01-08 16:58:12 DEBUG [com.jpcar.model.dao.jpcar.AdminDao.getByName:org.apache.ibatis.logging.jdbc.BaseJdbcLogger.debug(BaseJdbcLogger.java:145)] ==> Parameters: root(String) 2018-01-08 16:58:12 ERROR…
Mysql占用CPU过高的时候,该从哪些方面下手进行优化?占用CPU过高,可以做如下考虑:1)一般来讲,排除高并发的因素,还是要找到导致你CPU过高的哪几条在执行的SQL,show processlist语句,查找负荷最重的SQL语句,优化该SQL,比如适当建立某字段的索引:2)打开慢查询日志,将那些执行时间过长且占用资源过多的SQL拿来进行explain分析,导致CPU过高,多数是GroupBy.OrderBy排序问题所导致,然后慢慢进行优化改进.比如优化insert语句.优化group by…
一.部署mysql5.7二进制版 解压tar -xvf mv mysql-5.7  /usr/local/mysql5.7  或者其他文件夹 cd  /usr/local/mysql.57 useradd -s /sbin/nologin -M mysql mkdir  -p /usr/local/mysql5.7/etc 启动初始化数据 bin/mysqld   --initialize  --basedir=/usr/local/mysql5.7  --datadir=/usr/local/…