2 Replies Latest reply on Nov 27, 2012 9:45 AM by akoledzhikov

    StrictMaxPool: Acquire semaphore was interrupted

    venkman

      I'm trying to send various messages via MDB using JBoss 7.1.1. After a different time ( 3 to 10 seconds) i get

       

      javax.ejb.EJBException: JBAS014517: Acquire semaphore was interrupted

            at org.jboss.as.ejb3.pool.strictmax.StrictMaxPool.get(StrictMaxPool.java:111) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

       

      Standard value of max-ppol-size is 20, and i'm sending more.

       

      So i tried to change the max-pool-size (200000) and after that the timeout unit (SECONDS). In debug mode, i can see that these values are kept from the JBoss, but the errors occurs in the same time. (And i'm really sure, that i don't send 200.000 messages within a few seconds)

       

      So, any suggestions why this error occurs, and what i can do against it? It seems, that the semaphore cannot be aquired, but what can i do for releasing it?

       

      Thank in advance.

       

      PV

        • 1. Re: StrictMaxPool: Acquire semaphore was interrupted
          venkman

          Nobody got any idea, or wants additional information?

          • 2. Re: StrictMaxPool: Acquire semaphore was interrupted
            akoledzhikov

            I'm suffering from the same issue and I don't think the size of the pool is (directly) related. For me, it is set to 500 and no more than 50-100 stateless beans are active at any given time.

            Also, I'm using Infinispan and have some cache-related exceptions at the same time the semaphore exception appears. Here is an excerpt from the stack trace:

             

            Caused by: org.infinispan.CacheException: java.lang.InterruptedException

                at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:353)

                at org.infinispan.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:944)

                at org.infinispan.CacheImpl.put(CacheImpl.java:657)

                at org.infinispan.DecoratedCache.put(DecoratedCache.java:319)

                at org.infinispan.AbstractDelegatingCache.put(AbstractDelegatingCache.java:259)

                at org.hibernate.cache.infinispan.util.CacheAdapterImpl.put(CacheAdapterImpl.java:107)

                ... 162 more

            Caused by: java.lang.InterruptedException

                at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireNanos(AbstractQueuedSynchronizer.java:1244)

                at java.util.concurrent.locks.ReentrantLock.tryLock(ReentrantLock.java:445)

                at org.infinispan.util.concurrent.locks.containers.ReentrantPerEntryLockContainer.tryLock(ReentrantPerEntryLockContainer.java:65)

                at org.infinispan.util.concurrent.locks.containers.ReentrantPerEntryLockContainer.tryLock(ReentrantPerEntryLockContainer.java:34)

                at org.infinispan.util.concurrent.locks.containers.AbstractPerEntryLockContainer.acquireLock(AbstractPerEntryLockContainer.java:72)

                at org.infinispan.util.concurrent.locks.LockManagerImpl.lockAndRecord(LockManagerImpl.java:77)

                at org.infinispan.util.concurrent.locks.LockManagerImpl.lock(LockManagerImpl.java:197)

                at org.infinispan.util.concurrent.locks.LockManagerImpl.acquireLockNoCheck(LockManagerImpl.java:189)

                at org.infinispan.interceptors.locking.AbstractLockingInterceptor.lockKey(AbstractLockingInterceptor.java:114)

                at org.infinispan.interceptors.locking.NonTransactionalLockingInterceptor.visitPutKeyValueCommand(NonTransactionalLockingInterceptor.java:67)

                at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)

             

            Any ideas/suggsetions what to try as workaround?

            Thanks in advance!