4 Replies Latest reply on Jan 10, 2006 1:49 PM by Manik Surtani

    LockTimeoutException (with AsyncCacheLoader)

    Dan G Newbie

      I have a relatively small cache in which I'm trying to put a relatively small number of items. If I run my program without AsyncCacheLoader, it operates way too slowly. If I run it with AsyncCacheLoader, after a few put()s I start to get:

      ERROR - norgould.fetcher.process.WordVectorProcessor - SERIOUS ERROR: Cannout put item in word vector cache
      org.jboss.util.NestedRuntimeException: Lock expired. Locker -1_Thread-10_ThreadLocker: waited for lock on database=TreeCache-Group node=57 type=READ grant=WAIT_NEW timeoutMillis=500 startTime=1136353126842 endTime=1136353127345
      Owners: [
      ]
      Waiters: []
      ; - nested throwable: (com.sleepycat.je.txn.LockTimeOutException: Lock expired.
      Locker -1_Thread-10_ThreadLocker: waited for lock on database=TreeCache-Group node=57 type=READ grant=WAIT_NEW timeoutMillis=500 startTime=1136353126842 endTime=1136353127345 Owners: []
      Waiters: []
      )
      at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:4344)
      at org.jboss.cache.TreeCache.put(TreeCache.java:3083)
      at [my code]

      when all I'm doing it a simple put(fqn, key, val).

      In the config, my CacheLoader section looks like:

      org.jboss.cache.loader.bdbje.BdbjeCacheLoader

      location=/home/dlg/cache/bdbje

      true
      false
      true
      true

      and I'm using the DummyTransactionManager.

      Anyway, thank you for JBossCache--it looks like an amazing system (even if I'm stressing out because I have an important demo tomorrow).

      Thank you for any ideas & best,
      Dan

        • 1. Re: LockTimeoutException (with AsyncCacheLoader)
          Dan G Newbie

          Sorry, that last message had a lot of stuff that was stripped out on the form. Here goes another try:

          I have a relatively small cache in which I'm trying to put a relatively small number of items. If I run my program without AsyncCacheLoader, it operates way too slowly. If I run it with AsyncCacheLoader, after a few put()s I start to get:

          ERROR - norgould.fetcher.process.WordVectorProcessor - SERIOUS ERROR: Cannout put item in word vector cache
          org.jboss.util.NestedRuntimeException: Lock expired. Locker -1_Thread-10_ThreadLocker: waited for lock on database=TreeCache-Group node=57 type=READ grant=WAIT_NEW timeoutMillis=500 startTime=1136353126842 endTime=1136353127345
          Owners: [
          ]
          Waiters: []
          ; - nested throwable: (com.sleepycat.je.txn.LockTimeOutException: Lock expired.
          Locker -1_Thread-10_ThreadLocker: waited for lock on database=TreeCache-Group node=57 type=READ grant=WAIT_NEW timeoutMillis=500 startTime=1136353126842 endTime=1136353127345 Owners: []
          Waiters: []
          )
          at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:4344)
          at org.jboss.cache.TreeCache.put(TreeCache.java:3083)
          at [my code]

          when all I'm doing it a simple put(fqn, key, val).

          In the config, my CacheLoader section looks like:

          org.jboss.cache.loader.bdbje.BdbjeCacheLoader

          location=/home/dlg/cache/bdbje

          true
          false
          true
          true

          and I'm using the DummyTransactionManager.

          Anyway, thank you for JBossCache--it looks like an amazing system (even if I'm stressing out because I have an important demo tomorrow).

          Thank you for any ideas & best,
          Dan

          • 2. Re: LockTimeoutException (with AsyncCacheLoader)
            Dan G Newbie

            Oh, and if it matters, I have IsolationLevel at NONE. (And CacheMode at Local0

            My use case is that I want to store the items on disk quickly and load from the cache, but if the occasional item doesn't get stored to disk (because the system crashed before it got written) that's ok. I just don't want to have to wait for it to get written to disk before I can do a get().

            Thank you again,
            Dan

            • 3. Re: LockTimeoutException (with AsyncCacheLoader)
              Dan G Newbie

              Hmm. Nothing I've been trying seems to help. Has anyone here ever successfully used the AsyncCacheLoader with the current Bdbje?

              Unfortunately, it's looking like I'll have to replace JBossCache with something else at this point...

              • 4. Re: LockTimeoutException (with AsyncCacheLoader)
                Manik Surtani Master

                Hi there.

                Also, you may want to try increasing the transaction lock timeout for the BDBJE engine.

                http://www.sleepycat.com/jedocs/java/com/sleepycat/je/EnvironmentConfig.html

                At the moment, properties specified in the CacheLoaderConfig element are NOT passed in to the BDBJE engine, so you would have to set this using a je.properties file (see SleepyCat's docs for this - http://www.sleepycat.com/jedocs/).

                Cheers,
                Manik