3 Replies Latest reply on Mar 27, 2005 8:50 AM by Bela Ban

    problem with REPL_SYNC and REPL_ASYNC

    Amit Bansal Newbie

      Need Some Help/Inputs regarding JBossCache Configuration

      I'm getting the following results for a 10KB string object in TreeCache:

      1. Local Cache Mode: ~5500 puts/s.
      2. REPL_SYNC (Replicated Synchronous mode): ~50 puts/s (nested runtime exception after every 50 inserts in cache)
      3. REPL_ASYNC (Replicated Asynchronous mode): ~50 puts/s (nested runtime exception after every 50 inserts in cache)

      I created a simple java program that inserts the 10kb string, 5000 times in TreeCache and In case of REPL_SYNC and REPL_ASYNC when I run the java program, at the 51th element I am getting the NestedRuntimeException and program breaks. Again I run the program then exception is coming on 101th element then program breaks and so on i.e. after every 50th element I am getting NestedRuntimeException.

      I am inserting statement for cache in both try and catch blocks because if error is generated in ?try? block then it will again try in ?catch? block. In this case error is not coming but element is taking 10 seconds to insert in the cache.

      I tried to change the buffer size but still not getting better results.

        • 2. Re: problem with REPL_SYNC and REPL_ASYNC
          Amit Bansal Newbie

          Hi,

          Exceptions are for --

          Asynchronous Cache Mode
          1. ?With default Java Heap Size (64 MB)?, It is throwing an exception on putting around 2500th element and program terminates. The exception is ??.
          Exception in thread "main" org.jboss.util.NestedRuntimeException: Java heap space; -
          nested throwable: (java.lang.OutOfMemoryError: Java heap space)
          at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:3248)
          at org.jboss.cache.TreeCache.put(TreeCache.java:1749)
          at org.jboss.cache.TreeCache.put(TreeCache.java:1732)
          at TestTreeView.main(TestTreeView.java:53)
          Caused by: java.lang.OutOfMemoryError: Java heap space

          2.With the Java Heap Size is increased to 500 MB, then it is taking 10 seconds for putting all 5000 entries in the cache.


          Synchronous Cache Mode

          1. ?With default Java Heap Size (64 MB)?, It is throwing an exception on putting every 50th element. The exception is ??.
          org.jboss.util.NestedRuntimeException: rsp=sender=SGNSCC397599901:2377, retval=null, received=false, suspected=false; - nested throwable: (org.jboss.cache.lock.TimeoutException: rsp=sender=SGNSCC397599901:2377, retval=null, received=false, suspected=false)
          at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:3248)
          at org.jboss.cache.TreeCache.put(TreeCache.java:1749)
          at org.jboss.cache.TreeCache.put(TreeCache.java:1732)
          at TestTreeView.main(TestTreeView.java:49)

          Caused by:org.jboss.cache.lock.TimeoutException: rsp=sender=SGNSCC397599901:2377, retval=null, received=false, suspected=false
          at org.jboss.cache.TreeCache.callRemoteMethods(TreeCache.java:2153)
          at org.jboss.cache.TreeCache.callRemoteMethods(TreeCache.java:2175)
          at org.jboss.cache.interceptors.ReplicationInterceptor.invoke(ReplicationInterceptor.java:85)
          at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:43)
          at org.jboss.cache.interceptors.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
          at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:3245)
          ... 3 more

          2. With the Java Heap Size is increased to 500 MB, then 1st time it is taking 999 seconds (approx. 16 minutes) for putting all 5000 entries in the cache and putting every 50th entry, it is throwing the above mentioned exception.

          3. But the second time, when I run the java program, then it takes 350 seconds (approx. 6 minutes) for putting all 5000 entries and sometimes in between process, the ?Java Heap Out of Memory exception? is coming.

          Regards
          Amit

          • 3. Re: problem with REPL_SYNC and REPL_ASYNC
            Bela Ban Master

            - What version (1.2.1) ?
            - What JGroups repl props (fc-fast?) ?
            - Are you using the replication queue for async repl ?
            - Are you using transactions ? If so, do you wrap every put() into a TX.begin()/commit() ?