0 Replies Latest reply on Feb 17, 2014 5:11 AM by Bala Subrahmanyam

    Regarding Infinispan Cache issue

    Bala Subrahmanyam Newbie


      HI,

       

      I am using JBoss6, am getting the following error when if i try to do some operations with respect to infinispan cache forexample put some value in the cache then it throws the below exception.

       

      14:06:11,305 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] Execution error: : org.infinispan.util.concurrent.TimeoutExcepti

      on: Unable to acquire lock after [10 seconds] on key [NodeKey{contents=DATA, fqn=somevalue}] for requestor [GlobalTran

      saction:<applicationserverhostname:1100>:16:local]! Lock held by [GlobalTransaction:<applicationserverhostname:1100>:15:local]

              at org.infinispan.container.EntryFactoryImpl.acquireLock(EntryFactoryImpl.java:228) [:4.2.0.FINAL]

              at org.infinispan.container.EntryFactoryImpl.wrapEntryForWriting(EntryFactoryImpl.java:155) [:4.2.0.FINAL]

              at org.infinispan.container.EntryFactoryImpl.wrapEntryForWriting(EntryFactoryImpl.java:107) [:4.2.0.FINAL]

              at org.infinispan.interceptors.LockingInterceptor.visitPutKeyValueCommand(LockingInterceptor.java:296) [:4.2.0.FINAL]

              at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76) [:4.2.0.FINAL]

              at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [:4.2.0.FINAL]

              at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:132) [:4.2.0.FINAL]

              at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:58) [:4.2.0.FINAL]

              at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76) [:4.2.0.FINAL]

              at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [:4.2.0.FINAL]

              at org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:182) [:4.2.0.FINAL]

              at org.infinispan.interceptors.TxInterceptor.visitPutKeyValueCommand(TxInterceptor.java:130) [:4.2.0.FINAL]

              at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76) [:4.2.0.FINAL]

              at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [:4.2.0.FINAL]

              at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:87) [:4.2.0.FINAL]

              at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:58) [:4.2.0.FINAL]

              at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:58) [:4.2.0.FINAL]

              at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76) [:4.2.0.FINAL]

              at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [:4.2.0.FINAL]

              at org.infinispan.interceptors.BatchingInterceptor.handleDefault(BatchingInterceptor.java:76) [:4.2.0.FINAL]

              at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:58) [:4.2.0.FINAL]

              at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76) [:4.2.0.FINAL]

              at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:273) [:4.2.0.FINAL]

              at org.infinispan.CacheDelegate.putIfAbsent(CacheDelegate.java:453) [:4.2.0.FINAL]

              at org.infinispan.CacheSupport.putIfAbsent(CacheSupport.java:40) [:4.2.0.FINAL]

              at org.infinispan.atomic.AtomicHashMap.newInstance(AtomicHashMap.java:75) [:4.2.0.FINAL]

              at org.infinispan.atomic.AtomicMapLookup.getAtomicMap(AtomicMapLookup.java:53) [:4.2.0.FINAL]

              at org.infinispan.atomic.AtomicMapLookup.getAtomicMap(AtomicMapLookup.java:34) [:4.2.0.FINAL]

              at org.infinispan.tree.TreeStructureSupport.getAtomicMap(TreeStructureSupport.java:125) [:4.2.0.FINAL]

              at org.infinispan.tree.TreeStructureSupport.createNodeInCache(TreeStructureSupport.java:77) [:4.2.0.FINAL]

              at org.infinispan.tree.TreeCacheImpl.put(TreeCacheImpl.java:334) [:4.2.0.FINAL]

              at org.infinispan.tree.TreeCacheImpl.put(TreeCacheImpl.java:60) [:4.2.0.FINAL]

       

      Please find my infinispan-configuration below

       

      <infinispan-config name="some-cache"

        jndi-name="java:CacheManager/some-cache">

        <alias>somename-custom-cache</alias>

        <infinispan xmlns="urn:infinispan:config:4.2">

         <global>

          <asyncListenerExecutor

           factory="org.infinispan.executors.DefaultExecutorFactory">

           <properties>

            <property name="threadNamePrefix" value="AsyncListenerThread" />

           </properties>

          </asyncListenerExecutor>

          <asyncTransportExecutor

           factory="org.infinispan.executors.DefaultExecutorFactory">

           <properties>

            <property name="threadNamePrefix" value="AsyncSerializationThread" />

           </properties>

          </asyncTransportExecutor>

          <evictionScheduledExecutor

           factory="org.infinispan.executors.DefaultScheduledExecutorFactory">

           <properties>

            <property name="threadNamePrefix" value="EvictionThread" />

           </properties>

          </evictionScheduledExecutor>

          <!-- replicationQueueScheduledExecutor factory="org.infinispan.executors.DefaultScheduledExecutorFactory">

           <properties> <property name="threadNamePrefix" value="ReplicationQueueThread"/>

           </properties> </replicationQueueScheduledExecutor -->

          <globalJmxStatistics jmxDomain="infinispan" />

          <transport clusterName="${jboss.partition.name:DefaultPartition}-spider"

           distributedSyncTimeout="240000">

           <properties>

            <property name="stack" value="${jboss.default.jgroups.stack:spider}" />

           </properties>

          </transport>

         </global>

         <default>

          <expiration maxIdle="1000" />

          <locking isolationLevel="READ_COMMITTED" lockAcquisitionTimeout="10000" writeSkewCheck="false" concurrencyLevel="1024" useLockStriping="false" />

          <transaction

           transactionManagerLookupClass="org.infinispan.transaction.lookup.JBossTransactionManagerLookup"

           syncRollbackPhase="false" syncCommitPhase="false" />

          <invocationBatching enabled="true" />

          <clustering mode="LOCAL">

           <stateRetrieval timeout="5000" fetchInMemoryState="false" />

           <sync replTimeout="10000" />

          </clustering>

          <loaders passivation="false" shared="false">

           <loader

            class="org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore"

            fetchPersistentState="true" ignoreModifications="true"

            purgeOnStartup="true">

            <async enabled="true" />

           </loader>

          </loaders>

          <eviction maxEntries="5000" wakeUpInterval="5000" strategy="LRU" />

         </default>

         <namedCache name="/org/jboss/data">

          <expiration maxIdle="1000" />

          <eviction maxEntries="5000" strategy="LRU" />

         </namedCache>

         <namedCache name="/org/jboss/test/data">

          <expiration maxIdle="4" />

          <eviction maxEntries="5" strategy="LRU" />

         </namedCache>

        </infinispan>

      </infinispan-config>