I am getting TimeOutException in Infinispan Cache
-
12-10-2019 - |
Question
Below is my configuration file:
<?xml version="1.0" encoding="UTF-8"?>
<infinispan
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:4.2 http://www.infinispan.org/schemas/infinispan-config-4.2.xsd"
xmlns="urn:infinispan:config:4.2">
<global>
<transport clusterName="DEV2" transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport">
<properties>
<property name="configurationFile" value="../jgroups-tcp.xml" />
</properties>
</transport>
</global>
<default>
<clustering mode="distribution">
<l1 enabled="false"/>
<hash numOwners="1" rehashRpcTimeout="120000"/>
<sync/>
</clustering>
<eviction strategy="FIFO" maxEntries="1"/>
<expiration lifespan="1000" maxIdle="500" />
</default>
</infinispan>
Below is my exception trace out:
Caused by: org.infinispan.util.concurrent.TimeoutException: Unable to acquire lock after [10 seconds] on key [178328] for requestor [Thread[http-10.226.32.128-5000-Processor10,5,main]]! Lock held by [(another thread)]
Solution
I configured the locking property useLockStriping = "false". This will create a lock for the each entry added to the cache. This solves my issue
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow