[
https://issues.jboss.org/browse/ISPN-2068?page=com.atlassian.jira.plugin....
]
Giovanni Mels commented on ISPN-2068:
-------------------------------------
I also seem to have OOMs now after a couple of hours uptime. The application was not doing
anything at the time, so maybe this is caused by the expiration thread checking for stale
entries?
PurgeInternal operation in Cassandra cache store might lead to out of
memory
----------------------------------------------------------------------------
Key: ISPN-2068
URL:
https://issues.jboss.org/browse/ISPN-2068
Project: Infinispan
Issue Type: Bug
Components: Loaders and Stores
Affects Versions: 5.1.4.FINAL
Environment: Ubuntu server 10.04, OpenJDK 1.6.0_20
Reporter: Giovanni Mels
Assignee: Tristan Tarrant
Fix For: 5.1.5.FINAL, 5.2.0.ALPHA2
I am using Infinispan on top of a Cassandra cache store. Whenever I start an Infinispan
cluster node, and Cassandra contains data from a previous run, the application immediatly
allocates all available memory (1GB) and after a few minutes I get OutOfMemory exceptions
in org.infinispan.loaders.cassandra.CassandraCacheStore.purgeInternal.
If I purge Cassandra manually (TRUNCATE InfinispanEntries; TRUNCATE
InfinispanExpiration;) and restart the application, everything works again.
Note that there were only around 10000 entries stored in Cassandra (around 150 MB spread
over 2 nodes).
Infinispan loaders configuration:
<loaders passivation="false" preload="false"
shared="true">
<loader class="org.infinispan.loaders.cassandra.CassandraCacheStore"
fetchPersistentState="false" ignoreModifications="false"
purgeOnStartup="false">
<properties>
<!-- property name="autoCreateKeyspace"
value="true"/ -->
<property name="host" value="localhost" />
<property name="keySpace" value="Infinispan" />
<property name="entryColumnFamily"
value="InfinispanEntries" />
<property name="expirationColumnFamily"
value="InfinispanExpiration" />
<property name="sharedKeyspace" value="false"
/>
<property name="readConsistencyLevel" value="ONE"
/>
<property name="writeConsistencyLevel" value="ONE"
/>
<property name="configurationPropertiesFile"
value="cassandrapool.properties" />
<property name="keyMapper"
value="org.infinispan.loaders.keymappers.DefaultTwoWayKey2StringMapper" />
</properties>
</loader>
</loaders>
Stack trace:
Caused by: java.lang.OutOfMemoryError: Java heap space
at java.nio.ByteBuffer.wrap(ByteBuffer.java:367)
at java.nio.ByteBuffer.wrap(ByteBuffer.java:390)
at org.apache.thrift.TBaseHelper.rightSize(TBaseHelper.java:279)
at org.apache.cassandra.thrift.Column.getName(Column.java:195)
at
org.infinispan.loaders.cassandra.CassandraCacheStore.purgeInternal(CassandraCacheStore.java:539)
at
org.infinispan.loaders.cassandra.CassandraCacheStore.start(CassandraCacheStore.java:153)
at
org.infinispan.loaders.CacheLoaderManagerImpl.start(CacheLoaderManagerImpl.java:136)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:236)
at
org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:885)
at
org.infinispan.factories.AbstractComponentRegistry.invokeStartMethods(AbstractComponentRegistry.java:639)
at
org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:628)
at
org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:531)
at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:174)
at org.infinispan.CacheImpl.start(CacheImpl.java:521)
at
org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:656)
at
org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:549)
at
org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:521)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira