title: Infinispan initial state transfer timout
body: <p>I am working on setting up a replicated infinispan (9.4.16.Final, Wildfly 18.1) cache for two nodes (server1 and server2) and I am running into an issue where the initial state transfer times out on startup. This only happens when I am upgrading my application. </p>
  
  <pre><code>ERROR [2020-02-14 21:54:47,870] [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (thread-13,ejb,server1) ISPN000474: Error processing request 2017@server2
  ERROR [2020-02-14 21:54:47,876] [thread-13,ejb,server1] [transport.jgroups.JGroupsTransport] [] - ISPN000474: Error processing request 2020@server2
  
  ERROR [2020-02-14 20:49:54,732] [org.jboss.msc.service.fail] (ServerService Thread Pool -- 90) MSC000001: Failed to start service org.wildfly.clustering.infinispan.cache.mycontainer.mycache: org.jboss.msc.service.StartException in service org.wildfly.clustering.infinispan.cache.mycontainer.mycache: org.infinispan.commons.CacheException: Initial state transfer timed out for cache mycache on server1
      at org.wildfly.clustering.service@18.0.1.Final//org.wildfly.clustering.service.FunctionalService.start(FunctionalService.java:70)
      at org.wildfly.clustering.service@18.0.1.Final//org.wildfly.clustering.service.AsyncServiceConfigurator$AsyncService.lambda$start$0(AsyncServiceConfigurator.java:117)
      at org.jboss.threads@2.3.3.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
      at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
      at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
      at java.base/java.lang.Thread.run(Thread.java:834)
      at org.jboss.threads@2.3.3.Final//org.jboss.threads.JBossThread.run(JBossThread.java:485)
  Caused by: org.infinispan.commons.CacheException: Initial state transfer timed out for cache mycache on server1
      at org.infinispan@9.4.16.Final//org.infinispan.statetransfer.StateTransferManagerImpl.waitForInitialStateTransferToComplete(StateTransferManagerImpl.java:238)
      at org.infinispan@9.4.16.Final//org.infinispan.cache.impl.CacheImpl.start(CacheImpl.java:1113)
      at org.infinispan@9.4.16.Final//org.infinispan.cache.impl.AbstractDelegatingCache.start(AbstractDelegatingCache.java:511)
      at org.infinispan@9.4.16.Final//org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:657)
      at org.infinispan@9.4.16.Final//org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:601)
      at org.infinispan@9.4.16.Final//org.infinispan.manager.DefaultCacheManager.internalGetCache(DefaultCacheManager.java:484)
      at org.infinispan@9.4.16.Final//org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:468)
      at org.infinispan@9.4.16.Final//org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:454)
      at org.jboss.as.clustering.infinispan@18.0.1.Final//org.jboss.as.clustering.infinispan.DefaultCacheContainer.getCache(DefaultCacheContainer.java:83)
      at org.wildfly.clustering.infinispan.spi@18.0.1.Final//org.wildfly.clustering.infinispan.spi.service.CacheServiceConfigurator.get(CacheServiceConfigurator.java:77)
      at org.wildfly.clustering.infinispan.spi@18.0.1.Final//org.wildfly.clustering.infinispan.spi.service.CacheServiceConfigurator.get(CacheServiceConfigurator.java:55)
      at org.wildfly.clustering.service@18.0.1.Final//org.wildfly.clustering.service.FunctionalService.start(FunctionalService.java:67)
      ... 7 more
  
  ERROR [2020-02-14 21:54:47,864] [Controller Boot Thread] [as.controller.management-operation] [] - WFLYCTL0013: Operation ("add") failed - address: ([
      ("subsystem" =&gt; "infinispan"),
      ("cache-container" =&gt; "mycontainer"),
      ("replicated-cache" =&gt; "mycache"),
      ("component" =&gt; "backups")
  ]) - failure description: {"WFLYCTL0080: Failed services" =&gt; {"org.wildfly.clustering.infinispan.cache.mycontainer.mycache" =&gt; "org.infinispan.commons.CacheException: Initial state transfer timed out for cache mycache on server1
      Caused by: org.infinispan.commons.CacheException: Initial state transfer timed out for cache mycache on server1"}}
  </code></pre>
  
  <p>My configuration:</p>
  
  <pre><code>&lt;cache-container name="mycontainer"&gt;
      &lt;transport/&gt;
      &lt;replicated-cache name="mycache"&gt;
          &lt;locking acquire-timeout="30000" isolation="REPEATABLE_READ"/&gt;
          &lt;expiration interval="60000" lifespan="1200000" max-idle="-1"/&gt;
          &lt;file-store/&gt;
      &lt;/replicated-cache&gt;
  &lt;/cache-container&gt;
  </code></pre>
  
  <p>Can someone help? I've spent several hours trying to fix this but haven't had any luck. Thanks!</p>