I'm testing two clients contending on a clustered ehcache and its values and I'm getting boatloads of the following message:
WARNING: Last access time 1304702296 of element with key '1498517' is earlier than its creation time 1304702362. Setting it to the creation time.
What does this mean?
I am grabbing a write lock in a try/finally, randomly getting a cached object, incrementing a value, putting the object, and releasing the lock in the finally.
I have two servers running active/passive.
The load test code is running on both servers simultaneously. Only the passive server is reporting the errors.
Code:
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="ehcache.xsd" updateCheck="true"
monitoring="autodetect" dynamicConfig="true">
<diskStore path="/opt/TSA-data/persistence" />
<cacheManagerEventListenerFactory
class="" properties="" />
<terracottaConfig url="192.168.1.47:9510,192.168.1.50:9510" />
<defaultCache maxElementsInMemory="0"
eternal="false"
timeToIdleSeconds="1200"
timeToLiveSeconds="1200">
<terracotta />
</defaultCache>
<cache name="deviceDataItemCache"
maxElementsInMemory="1000"
maxElementsOnDisk="0"
eternal="true"
diskSpoolBufferSizeMB="20"
memoryStoreEvictionPolicy="LRU">
<terracotta clustered="true" valueMode="serialization" />
</cache>
</ehcache>
Code:
<tc:tc-config xmlns:tc="http://www.terracotta.org/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.terracotta.org/schema/terracotta-6.xsd">
<tc-properties>
<property name="l2.nha.dirtydb.autoDelete" value="true" />
<property name="l1.cachemanager.enabled" value="true" />
<property name="logging.maxLogFileSize" value="1024" />
</tc-properties>
<system>
<configuration-model>development</configuration-model>
</system>
<servers>
<server host="gaia.axeda.com" name="gaia" bind="192.168.1.47">
<data>/opt/TSA-data/server-data</data>
<logs>/opt/TSA-data/server-logs</logs>
<index>/opt/TSA-data/server-index</index>
<statistics>/opt/TSA-data/server-statistics</statistics>
<dso-port bind="0.0.0.0">9510</dso-port>
<jmx-port bind="0.0.0.0">9520</jmx-port>
<l2-group-port bind="0.0.0.0">9530</l2-group-port>
<authentication />
<dso>
<client-reconnect-window>120</client-reconnect-window>
<persistence>
<mode>permanent-store</mode>
</persistence>
<garbage-collection>
<enabled>true</enabled>
<verbose>false</verbose>
<interval>3600</interval>
</garbage-collection>
</dso>
</server>
<server host="cronus.axeda.com" name="cronus" bind="192.168.1.50">
<data>/opt/TSA-data/server-data</data>
<logs>/opt/TSA-data/server-logs</logs>
<index>/opt/TSA-data/server-index</index>
<statistics>/opt/TSA-data/server-statistics</statistics>
<dso-port bind="0.0.0.0">9510</dso-port>
<jmx-port bind="0.0.0.0">9520</jmx-port>
<l2-group-port bind="0.0.0.0">9530</l2-group-port>
<authentication />
<dso>
<client-reconnect-window>120</client-reconnect-window>
<persistence>
<mode>permanent-store</mode>
</persistence>
<garbage-collection>
<enabled>true</enabled>
<verbose>false</verbose>
<interval>3600</interval>
</garbage-collection>
</dso>
</server>
<update-check>
<enabled>true</enabled>
<period-days>10</period-days>
</update-check>
</servers>
<clients>
<logs>logs-%i</logs>
</clients>
</tc:tc-config>