gpt4 book ai didi

java - org.infinispan.interceptors.InitationContextInterceptor : . ..无法获取锁定

转载 作者:行者123 更新时间:2023-11-30 08:14:34 28 4
gpt4 key购买 nike

我们在 Glassfish (3.1.2) 应用程序的多服务器集群中使用 infinispan 5.3.0。应用程序有用户处理事件,这些事件存储在 infinispan 缓存中。

在某些(高峰?)时间,我们在 infinispan 日志中看到许多以下堆栈跟踪:

2015.04.24_14:41:47,482 - ERROR org.infinispan.interceptors.InvocationContextInterceptor: ISPN000136: Execution error [Thread=http-thread-pool-26861(93)]
org.infinispan.util.concurrent.TimeoutException: Could not acquire lock on 66f2ebb9-cb22-4ba1-be6f-55ca0167cab6 on behalf of transaction GlobalTransaction:<[servername]-30723>:283157:local. Lock is being held by GlobalTransaction:<[servername]-59526>:141148:remote
at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.newTimeoutException(AbstractTxLockingInterceptor.java:238)
at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.waitForTransactionsToComplete(AbstractTxLockingInterceptor.java:231)
at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.lockKeyAndCheckOwnership(AbstractTxLockingInterceptor.java:191)
at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.lockAndRegisterBackupLock(AbstractTxLockingInterceptor.java:136)
at org.infinispan.interceptors.locking.PessimisticLockingInterceptor.visitLockControlCommand(PessimisticLockingInterceptor.java:255)
at org.infinispan.commands.control.LockControlCommand.acceptVisitor(LockControlCommand.java:132)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)
at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:134)
at org.infinispan.commands.AbstractVisitor.visitLockControlCommand(AbstractVisitor.java:169)
at org.infinispan.commands.control.LockControlCommand.acceptVisitor(LockControlCommand.java:132)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)
at org.infinispan.interceptors.TxInterceptor.invokeNextInterceptorAndVerifyTransaction(TxInterceptor.java:130)
at org.infinispan.interceptors.TxInterceptor.visitLockControlCommand(TxInterceptor.java:189)
at org.infinispan.commands.control.LockControlCommand.acceptVisitor(LockControlCommand.java:132)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)
at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:134)
at org.infinispan.commands.AbstractVisitor.visitLockControlCommand(AbstractVisitor.java:169)
at org.infinispan.statetransfer.TransactionSynchronizerInterceptor.visitLockControlCommand(TransactionSynchronizerInterceptor.java:97)
at org.infinispan.commands.control.LockControlCommand.acceptVisitor(LockControlCommand.java:132)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)
at org.infinispan.statetransfer.StateTransferInterceptor.handleTopologyAffectedCommand(StateTransferInterceptor.java:216)
at org.infinispan.statetransfer.StateTransferInterceptor.handleTxCommand(StateTransferInterceptor.java:189)
at org.infinispan.statetransfer.StateTransferInterceptor.visitLockControlCommand(StateTransferInterceptor.java:131)
at org.infinispan.commands.control.LockControlCommand.acceptVisitor(LockControlCommand.java:132)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)
at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:134)
at org.infinispan.commands.AbstractVisitor.visitLockControlCommand(AbstractVisitor.java:169)
at org.infinispan.commands.control.LockControlCommand.acceptVisitor(LockControlCommand.java:132)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)
at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:128)
at org.infinispan.interceptors.InvocationContextInterceptor.visitLockControlCommand(InvocationContextInterceptor.java:97)
at org.infinispan.commands.control.LockControlCommand.acceptVisitor(LockControlCommand.java:132)
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:343)
at org.infinispan.CacheImpl.lock(CacheImpl.java:672)
at org.infinispan.DecoratedCache.lock(DecoratedCache.java:139)


2015.04.24_14:46:39,010 - ERROR org.infinispan.remoting.InboundInvocationHandlerImpl: Exception executing command [Thread=remote-thread-13]
org.infinispan.util.concurrent.TimeoutException: Could not acquire lock on [event-lock-id>] on behalf of transaction GlobalTransaction:<[servername]-37484>:26400:remote. Lock is being held by null
at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.newTimeoutException(AbstractTxLockingInterceptor.java:238)
at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.waitForTransactionsToComplete(AbstractTxLockingInterceptor.java:231)
at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.lockKeyAndCheckOwnership(AbstractTxLockingInterceptor.java:191)
at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.lockAndRegisterBackupLock(AbstractTxLockingInterceptor.java:136)
at org.infinispan.interceptors.locking.PessimisticLockingInterceptor.visitLockControlCommand(PessimisticLockingInterceptor.java:255)
at org.infinispan.commands.control.LockControlCommand.acceptVisitor(LockControlCommand.java:132)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)
at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:134)
at org.infinispan.commands.AbstractVisitor.visitLockControlCommand(AbstractVisitor.java:169)
at org.infinispan.commands.control.LockControlCommand.acceptVisitor(LockControlCommand.java:132)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)
at org.infinispan.interceptors.TxInterceptor.invokeNextInterceptorAndVerifyTransaction(TxInterceptor.java:130)
at org.infinispan.interceptors.TxInterceptor.visitLockControlCommand(TxInterceptor.java:189)
at org.infinispan.commands.control.LockControlCommand.acceptVisitor(LockControlCommand.java:132)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)
at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:134)
at org.infinispan.commands.AbstractVisitor.visitLockControlCommand(AbstractVisitor.java:169)
at org.infinispan.statetransfer.TransactionSynchronizerInterceptor.visitLockControlCommand(TransactionSynchronizerInterceptor.java:94)

有人知道导致这些错误的原因或任何进一步分析的指示吗?

提前致谢!

最佳答案

Infinispan使用分布式锁来同步缓存修改。其原因与同步多线程访问变量相同。在高峰时段,锁争用变得过高,并且某些锁获取尝试会超时。考虑增加锁获取超时或配置锁 strip 化。有关详细信息,请参阅 Infinispan 用户指南:5. Locking and Concurrency .

关于java - org.infinispan.interceptors.InitationContextInterceptor : . ..无法获取锁定,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29845126/

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