3 Replies Latest reply on Dec 6, 2012 2:02 PM by Mircea Markus

    infispan cache seems to fail with transaction time out all the time

    peter craddock Novice

      In my application I used to manage a cache in memory so in as7 I decided to try and use the infispan module to do this for me.

       

      When I run a single node in standalone made i use the following config

              <cache-container name="cpContextCache" aliases="cpCache" default-cache="id" start="EAGER">
                  <local-cache name="id"/>
                  <local-cache name="context"/>
              </cache-container>

       

      This works as expected so when I moved to 2 nodes in a cluster I altered the config as below

              <cache-container name="cpContextCache" aliases="cpCache" default-cache="id" start="EAGER">
                  <transport lock-timeout="60000"/>
                  <replicated-cache name="id" mode="ASYNC"/>
                  <replicated-cache name="context" mode="ASYNC"/>
              </cache-container>

       

      Now when I put something in the cache I get a transaction timeout is my config correct or have i done something wrong in the config

        • 1. Re: infispan cache seems to fail with transaction time out all the time
          peter craddock Novice

          I have done some more digging and if I start node 1 first then node 2 and loginto node 1 I get the timeout exception when I first put something in the cache.

           

          If I start node 2 first then node 1 and log into node 1 I get a different exception when its trying to lookup the cache from the cache container

           

          09:57:11,364 ERROR [stderr] (http-CED12212-10.2.32.7-5020-6) org.infinispan.CacheException: Unable to invoke method private void org.infinispan.statetransfer.BaseStateTransferManagerImpl.start() throws java.lang.Exception on object

          09:57:11,364 ERROR [stderr] (http-CED12212-10.2.32.7-5020-6)    at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:238)

          09:57:11,379 ERROR [stderr] (http-CED12212-10.2.32.7-5020-6)    at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:882)

          09:57:11,379 ERROR [stderr] (http-CED12212-10.2.32.7-5020-6)    at org.infinispan.factories.AbstractComponentRegistry.in

          vokeStartMethods(AbstractComponentRegistry.java:637)

          09:57:11,379 ERROR [stderr] (http-CED12212-10.2.32.7-5020-6)    at org.infinispan.factories.AbstractComponentRegistry.in

          ternalStart(AbstractComponentRegistry.java:626)

          09:57:11,379 ERROR [stderr] (http-CED12212-10.2.32.7-5020-6)    at org.infinispan.factories.AbstractComponentRegistry.st

          art(AbstractComponentRegistry.java:530)

          09:57:11,379 ERROR [stderr] (http-CED12212-10.2.32.7-5020-6)    at org.infinispan.factories.ComponentRegistry.start(Comp

          onentRegistry.java:173)

          09:57:11,379 ERROR [stderr] (http-CED12212-10.2.32.7-5020-6)    at org.infinispan.CacheImpl.start(CacheImpl.java:499)

          09:57:11,379 ERROR [stderr] (http-CED12212-10.2.32.7-5020-6)    at org.infinispan.manager.DefaultCacheManager.createCach

          e(DefaultCacheManager.java:626)

          09:57:11,379 ERROR [stderr] (http-CED12212-10.2.32.7-5020-6)    at org.infinispan.manager.DefaultCacheManager.getCache(D

          efaultCacheManager.java:516)

          09:57:11,395 ERROR [stderr] (http-CED12212-10.2.32.7-5020-6)    at org.infinispan.manager.DefaultCacheManager.getCache(D

          efaultCacheManager.java:530)

          09:57:11,395 ERROR [stderr] (http-CED12212-10.2.32.7-5020-6)    at org.jboss.as.clustering.infinispan.DefaultEmbeddedCac

          heManager.getCache(DefaultEmbeddedCacheManager.java:148)

          09:57:11,395 ERROR [stderr] (http-CED12212-10.2.32.7-5020-6)    at org.jboss.as.clustering.infinispan.DefaultEmbeddedCac

          heManager.getCache(DefaultEmbeddedCacheManager.java:139)

          09:57:11,395 ERROR [stderr] (http-CED12212-10.2.32.7-5020-6)    at com.cedar.cp.utc.cache.InfiCacheImpl.<init>(InfiCache

           

          The session is deing replicated so I'm I guess the cluster is setup correctly

          • 2. Re: infispan cache seems to fail with transaction time out all the time
            peter craddock Novice

            Well I have sorted it I assumed that the nested cache elements would also start once I added the start attribute all seems to be working

             

                    <cache-container name="cpContextCache" aliases="cpCache" default-cache="id" start="EAGER">
                        <transport lock-timeout="60000"/>
                        <replicated-cache name="id" mode="ASYNC" start="EAGER" batching="true"/>
                        <replicated-cache name="context" mode="ASYNC" start="EAGER" batching="true"/>
                    </cache-container>