MySQL异常:Caused by: com.mysql.jdbc.exceptions.MySQLTimeoutException: Statement cancelled due to timeo
Posted 水滴
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MySQL异常:Caused by: com.mysql.jdbc.exceptions.MySQLTimeoutException: Statement cancelled due to timeo相关的知识,希望对你有一定的参考价值。
Caused by: com.mysql.jdbc.exceptions.MySQLTimeoutException: Statement cancelled due to timeout or client request
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2303)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2696)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2105)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2398)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2316)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2301)
at org.jboss.resource.adapter.jdbc.CachedPreparedStatement.executeUpdate(CachedPreparedStatement.java:95)
at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:251)
解决方法
设置defaultStatementTimeout="60"
在sqlmap.xml中设置,表示60s
sqlMapConfig>
<settings cacheModelsEnabled="false" enhancementEnabled="true" lazyLoadingEnabled="false" errorTracingEnabled="true" maxRequests="32"
maxSessions="10" maxTransactions="5" useStatementNamespaces="true" defaultStatementTimeout="60" />
以上是关于MySQL异常:Caused by: com.mysql.jdbc.exceptions.MySQLTimeoutException: Statement cancelled due to timeo的主要内容,如果未能解决你的问题,请参考以下文章
ssm项目——异常:Caused by: java.lang.IllegalStateException
异常Caused by: org.apache.phoenix.coprocessor.HashJoinCacheNotFoundException:
异常Caused by: java.lang.ClassNotFoundException: org.springframework.dao.DataIntegrityViolationExcep
mysql升级Caused by: com.mysql.jdbc.exceptions clause; this is incompatible with sql_mode=only_full_gr
java 使用反射创建对象时异常 InstantiationException: Caused by: java.lang.NoSuchMethodException:
异常Caused by: java.lang.IllegalStateException: Method has too many Body parameters