gpt4 book ai didi

10 分钟后 Jboss 4.2.3 事务超时

转载 作者:行者123 更新时间:2023-12-01 22:57:13 26 4
gpt4 key购买 nike

我的 jboss 上运行着一个很长的事务(超过 10 分钟)。此事务在 10 分钟后始终失败。我改变了我的 jboss-service.xml 如下:

<mbean code="com.arjuna.ats.jbossatx.jta.TransactionManagerService"
name="jboss:service=TransactionManager">
<attribute name="TransactionTimeout">1200</attribute>
<attribute name="ObjectStoreDir">${jboss.server.data.dir}/tx-object-store</attribute>
</mbean>

我还更改了 standardjboss.xml 中的最大 bean 年龄(出现 10 次):

<max-bean-age>1600</max-bean-age>

默认设置为 600(10 分钟),但问题仍然出现在 1600 上。

一些日志:我在交易过程中得到了数千次:

 2012-10-29 15:57:45,006 DEBUG [com.hp.hpl.jena.shared.LockMRSW] Lock : http-0.0.0.0-8080-2
2012-10-29 15:57:45,006 DEBUG [com.hp.hpl.jena.shared.LockMRSW] http-0.0.0.0-8080-2 >> enterCS: Thread R/W: 0/0 :: Model R/W: 0/0 (thread: http-0.0.0.0-8080-2)
2012-10-29 15:57:45,006 DEBUG [com.hp.hpl.jena.shared.LockMRSW] http-0.0.0.0-8080-2 << enterCS: Thread R/W: 0/1 :: Model R/W: 0/1 (thread: http-0.0.0.0-8080-2)
2012-10-29 15:57:45,006 DEBUG [com.hp.hpl.jena.shared.LockMRSW] http-0.0.0.0-8080-2 >> leaveCS: Thread R/W: 0/1 :: Model R/W: 0/1 (thread: http-0.0.0.0-8080-2)
2012-10-29 15:57:45,006 DEBUG [com.hp.hpl.jena.shared.LockMRSW] http-0.0.0.0-8080-2 << leaveCS: Thread R/W: 0/0 :: Model R/W: 0/0 (thread: http-0.0.0.0-8080-2)
2012-10-29 15:57:45,115 DEBUG [com.hp.hpl.jena.shared.LockMRSW] Lock : http-0.0.0.0-8080-2

失败时:

2012-10-29 15:58:12,944 DEBUG [com.hp.hpl.jena.shared.LockMRSW] Lock : http-0.0.0.0-8080-2
2012-10-29 15:58:12,944 DEBUG [com.hp.hpl.jena.shared.LockMRSW] http-0.0.0.0-8080-2 >> enterCS: Thread R/W: 0/0 :: Model R/W: 0/0 (thread: http-0.0.0.0-8080-2)
2012-10-29 15:58:12,944 DEBUG [com.hp.hpl.jena.shared.LockMRSW] http-0.0.0.0-8080-2 << enterCS: Thread R/W: 0/1 :: Model R/W: 0/1 (thread: http-0.0.0.0-8080-2)
2012-10-29 15:58:12,944 DEBUG [com.hp.hpl.jena.shared.LockMRSW] http-0.0.0.0-8080-2 >> leaveCS: Thread R/W: 0/1 :: Model R/W: 0/1 (thread: http-0.0.0.0-8080-2)
2012-10-29 15:58:12,944 DEBUG [com.hp.hpl.jena.shared.LockMRSW] http-0.0.0.0-8080-2 << leaveCS: Thread R/W: 0/0 :: Model R/W: 0/0 (thread: http-0.0.0.0-8080-2)
2012-10-29 15:58:12,975 DEBUG [org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager] Attempting to activate; id=4spxl-oj441k-h8vp9pzg-1-h8vpcqc2-p
2012-10-29 15:58:13,100 ERROR [org.nuxeo.ecm.core.event.impl.EventServiceImpl] Error during sync listener execution
javax.ejb.NoSuchEJBException: Could not find stateful bean: 4spxl-oj441k-h8vp9pzg-1-h8vpcqc2-p
at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:390)
at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:375)
at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:61)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.RoleBasedAuthorizationInterceptor.invoke(RoleBasedAuthorizationInterceptor.java:166)
at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptor.invoke(RoleBasedAuthorizationInterceptor.java:115)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)

有人可以帮助我吗?

这里有一个相关帖子但没有解决方案:https://community.jboss.org/thread/159596

非常感谢!

最佳答案

我找到了解决方案:

进入:“jboss\server\default\conf\jboss-service.xml”行:1200(默认为 300)

然后

进入:"jboss\server\default\deploy\ejb3-interceptors-aop.xml"

找到:idleTimeoutSeconds=300

替换为:idleTimeoutSeconds=1800

出现4次,全部替换

关于10 分钟后 Jboss 4.2.3 事务超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13124523/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com