码迷,mamicode.com
首页 > 数据库 > 详细

MySQL异常:Caused by: com.mysql.jdbc.exceptions.MySQLTimeoutException: Statement cancelled due to timeout or client request

时间:2018-11-22 11:48:01      阅读:1731      评论:0      收藏:0      [点我收藏+]

标签:mod   default   aci   except   jdb   sed   source   ace   wrap   

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 timeout or client request

标签:mod   default   aci   except   jdb   sed   source   ace   wrap   

原文地址:https://www.cnblogs.com/lotuses/p/9999808.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!