【问题标题】:Wrong atomikos state ABORTING after timeout in transaction事务超时后错误的 atomikos 状态 ABORTING
【发布时间】:2018-11-07 13:14:12
【问题描述】:

我正在测试 atomikos 如何解决事务中的超时问题。我从 db 无限读取有 30s 超时。 30 多岁后我得到了这个例外:

14:08:40.329 [Atomikos:4] WARN  c.a.icatch.imp.ActiveStateHandler - Transaction rob-app-b1c7b95a3b0efb82dfb516b04620a213154159609015500001 has timed out - rolling back...

2018-11-07 14:08:40.354 [pool-3-thread-1] WARN  c.a.jdbc.JdbcConnectionProxyHelper - Error enlisting in transaction - connection might be broken? Please check the logs for more information...
java.lang.IllegalStateException: wrong state: ABORTING
    at com.atomikos.icatch.imp.CoordinatorImp.registerSynchronization(CoordinatorImp.java:420)
    at com.atomikos.icatch.imp.TransactionStateHandler.registerSynchronization(TransactionStateHandler.java:129)
    at com.atomikos.icatch.imp.CompositeTransactionImp.registerSynchronization(CompositeTransactionImp.java:177)
    at com.atomikos.jdbc.AtomikosConnectionProxy.enlist(AtomikosConnectionProxy.java:211)
    at com.atomikos.jdbc.AtomikosConnectionProxy.invoke(AtomikosConnectionProxy.java:122)
    at com.sun.proxy.$Proxy133.prepareStatement(Unknown Source)

为什么我在 enlist 方法期间收到此错误并且 AtomikosConnectionProxy 中没有 Atomikos 异常?

 AtomikosSQLException.throwAtomikosSQLException("The transaction has timed out - try increasing the timeout if needed");

【问题讨论】:

    标签: spring atomikos


    【解决方案1】:

    似乎出现了超时,因为您的应用程序使用事务的时间过长。尝试增加事务超时?

    【讨论】:

      猜你喜欢
      • 2011-09-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-09-16
      • 2017-05-04
      • 1970-01-01
      • 2020-12-13
      相关资源
      最近更新 更多