9 Replies Latest reply on Feb 4, 2011 11:09 AM by Jacek Gerbszt

    Limit on entries in Infinispan cache in cluster setup

    divyapt pt Newbie

      I put  2 million entries into the cache on one node .

       

      When i try to access those entries in another node in a cluster set up . i get this error :

       

      Exception in thread "main" org.infinispan.CacheException: Unable to invoke method public void org.infinispan.distribution.DistributionManagerImpl.waitForJoinToComplete() throws java.lang.Throwable on object

              at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:174)

              at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:889)

              at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:687)

              at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:589)

              at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:150)

              at org.infinispan.CacheDelegate.start(CacheDelegate.java:317)

              at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:516)

              at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:439)

              at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:408)

              at InfiniSpanTest2.main(InfiniSpanTest2.java:19)

      Caused by: java.lang.reflect.InvocationTargetException

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              at java.lang.reflect.Method.invoke(Method.java:597)

              at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:171)

              ... 9 more

      Caused by: org.infinispan.CacheException: Unexpected exception

              at org.infinispan.distribution.JoinTask.performRehash(JoinTask.java:142)

              at org.infinispan.distribution.RehashTask.call(RehashTask.java:53)

              at org.infinispan.distribution.RehashTask.call(RehashTask.java:33)

              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

              at java.util.concurrent.FutureTask.run(FutureTask.java:138)

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

              at java.lang.Thread.run(Thread.java:619)

      Caused by: org.infinispan.CacheException: Remote (slave84-52573) failed unexpectedly

              at org.infinispan.remoting.transport.AbstractTransport.parseResponseAndAddToResponseList(AbstractTransport.java:74)

              at org.infinispan.remoting.transport.jgroups.JGroupsTransport.invokeRemotely(JGroupsTransport.java:414)

              at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:101)

              at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:125)

              at org.infinispan.distribution.JoinTask.performRehash(JoinTask.java:113)

              ... 7 more

      Caused by: java.lang.OutOfMemoryError: Java heap space

              at org.infinispan.io.ExposedByteArrayOutputStream.write(ExposedByteArrayOutputStream.java:90)

              at org.jboss.marshalling.Marshalling$6.write(Marshalling.java:378)

              at org.jboss.marshalling.UTFUtils.writeUTFBytes(UTFUtils.java:134)

              at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:328)

              at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:423)

              at org.infinispan.container.entries.MortalCacheValue$Externalizer.writeObject(MortalCacheValue.java:100)

              at org.infinispan.marshall.jboss.ConstantObjectTable$ExternalizerAdapter.writeObject(ConstantObjectTable.java:322)

              at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:147)

              at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:423)

              at org.infinispan.marshall.MarshallUtil.marshallMap(MarshallUtil.java:59)

              at org.infinispan.marshall.exts.MapExternalizer.writeObject(MapExternalizer.java:61)

              at org.infinispan.marshall.jboss.ConstantObjectTable$ExternalizerAdapter.writeObject(ConstantObjectTable.java:322)

              at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:147)

              at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:423)

              at org.infinispan.remoting.responses.SuccessfulResponse$Externalizer.writeObject(SuccessfulResponse.java:59)

              at org.infinispan.marshall.jboss.ConstantObjectTable$ExternalizerAdapter.writeObject(ConstantObjectTable.java:322)

              at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:147)

              at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:423)

              at org.infinispan.marshall.jboss.GenericJBossMarshaller.objectToObjectStream(GenericJBossMarshaller.java:98)

              at org.infinispan.marshall.VersionAwareMarshaller.objectToBuffer(VersionAwareMarshaller.java:93)

              at org.infinispan.marshall.AbstractMarshaller.objectToBuffer(AbstractMarshaller.java:31)

              at org.infinispan.remoting.transport.jgroups.MarshallerAdapter.objectToBuffer(MarshallerAdapter.java:22)

              at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:595)

              at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:489)

              at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:365)

              at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:771)

              at org.jgroups.JChannel.up(JChannel.java:1465)

              at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:954)

              at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:430)

              at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER.up(STREAMING_STATE_TRANSFER.java:265)

              at org.jgroups.protocols.FRAG2.up(FRAG2.java:190)

              at org.jgroups.protocols.FlowControl.up(FlowControl.java:419)

       

       

      I get this error even after i increase the heapspace.

       

      Is there any limit on the number of entries in the cache? If not how do i overcome this error?

       

       

      Thanks,

      Divya