2010-06-30 15:39:50,474 INFO [com.sumavision.tjwh.service.ArticleServiceImpl]
- **********定时调度,拷贝数据库内容到本地开始************
2010-06-30 15:39:52,618 INFO
[org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML
bean definitions from class path resource
[org/springframework/jdbc/support/sql-error-codes.xml]
2010-06-30
15:39:52,739 INFO [org.springframework.jdbc.support.SQLErrorCodesFactory] -
SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle,
PostgreSQL, Sybase]
2010-06-30 15:39:52,882 WARN
[org.springframework.jdbc.support.SQLErrorCodesFactory] - Error while extracting
database product name - falling back to empty error
codes
org.springframework.jdbc.support.MetaDataAccessException: Error while
extracting DatabaseMetaData; nested exception is
com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: No operations
allowed after connection closed.Connection was implicitly closed due to
underlying exception/error:
** BEGIN NESTED EXCEPTION **
com.mysql.jdbc.CommunicationsException
MESSAGE: Communications link
failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.io.EOFException
STACKTRACE:
java.io.EOFException
at
com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1907)
at
com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2298)
at
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2797)
at
com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1567)
at
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1659)
at
com.mysql.jdbc.Connection.execSQL(Connection.java:3112)
at
com.mysql.jdbc.Connection.execSQL(Connection.java:3041)
at
com.mysql.jdbc.Statement.execute(Statement.java:686)
at
org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
at
org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:422)
at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:396)
at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:429)
at
com.sumavision.tjwh.dao.ArticleDaoImpl.deleteAll(ArticleDaoImpl.java:182)
at
com.sumavision.tjwh.service.ArticleServiceImpl.schoduleJobCopyData(ArticleServiceImpl.java:107)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
java.lang.reflect.Method.invoke(Method.java:597)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at
$Proxy48.schoduleJobCopyData(Unknown Source)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
java.lang.reflect.Method.invoke(Method.java:597)
at
org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:276)
at
org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:260)
at
org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
at
org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:531)
** END NESTED EXCEPTION **
Last packet sent to the server was 3 ms
ago.
在天津中间件演示项目中,现场出现该问题,解决办法:在MySql数据库的安装目录下my.ini文件中,加入
wait_timeout=31536000
以下资料未验证过:
1、一般的解决方法大多是在数据库连接字符串中增加“autoReconnect=true
”选项。但是这只对mysql4以前的版本有效。在最新的mysql中是无效的。其实要解决这个问题也有一个简单的方法,就是修改mysql的启动参数。
缺省情况下mysql的timeout时间是28800秒,正好是8小时,增加一个0就可以了。
同理也可以在" my.ini"文件中增加此参数。
mysqld-nt --default-table-type=innodb --interactive_timeout=288000
2、从根源入手,设置mysql的wait_timeout为31536000(一年)。
mysql> show variables;
| wait_timeout | 28800
| interactive_timeout | 28800
" my.ini"文件中修改此参数
[mysqld]
wait_timeout=31536000
interactive_timeout=31536000
重启服务,OK!
分享到:
相关推荐
nodejs 关于mysql模块 连接超时自动断开解决方法,在这块遇到的坑,而且坑了很久才找到的,分享只为求分
mysql5将其连接的等待时间(wait_timeout)缺省为8小时。怎么不让它超时呢
MySQL数据库连接超时(Wait_timeout)问题总结.pdfMySQL数据库连接超时(Wait_timeout)问题总结.pdfMySQL数据库连接超时(Wait_timeout)问题总结.pdfMySQL数据库连接超时(Wait_timeout)问题总结.pdfMySQL数据库连接超时...
提供一个c# socket连接池设计的例子,解决socket并发连接限制的问题,并且提供一种设置连接超时时间的方法,默认连接超时时间是不能设置的,提供了socket网络发送数据的接口.可用于pos小票打印机通讯。
当mysql 8小时空闲后会出现连接超时问题,本文介绍要解决这个问题也有一个简单的方法,就是修改mysql的启动参数。缺省情况下mysql的timeout时间是28800秒,正好是8小时,增加一个0就可以了。
可以直接通过设置来达到重连问题,方法很简单,里面有复现自动断开连接导致不能正常插入数据的方法,是自己没有积分所以才要积分
关于MySQL的wait_timeout连接超时问题报错详细解决方案
此文档主要是tomcat中MySQL连接池配置 - feng - BlogJava
主要介绍了解决mysql服务器在无操作超时主动断开连接的情况,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
。。。
。。。
PHP连接MySQL主要是使用Mysql提供的 libmysqlclient 的客户端库,同时也延伸出来 mysql 和 mysqli 两套PHP的扩展,相对来说 mysqli 比 mysql 更好,更稳定。
本文提供使用Linux的Shell脚本定时处理MySQL超时Locked进程脚本
却卡第一个测试上,启动provider服务和Consumer服务,请求接口却始终报zookeeper请求超时错误(dubbo+zookeeper服务端重复调用三次),经过排查,我的问题是出在dao层与数据库连接的问题上(而且provider方还不报错,...
nacos连接mysql8.x,文件不知道为什么一直提示过大上传不了。这是百度网盘地址.
VB连接mysql例子(带控件),方法简单,使用也比较方便,解决了vb使用mysql的难题
利用C#语言(或其它支持ODBC接口的高级程序设计语言)编程实现简单的数据库应用程序
easymysql 基于node-mysql 开发而来,提供一个简单、高可用的mysql连接基础库。主要特性如下: 支持query超时控制; 可控制的连接池支持,SQL总是尽可能早地被 可用的 空闲连接抢到并执行; 支持master-slave...