[jboss-user] [JBoss Messaging] - Re: EJBException: Failed to acquire the pool semaphore
Samuel Tannous
do-not-reply at jboss.com
Mon Apr 23 02:53:58 EDT 2012
Samuel Tannous [https://community.jboss.org/people/stannous] created the discussion
"Re: EJBException: Failed to acquire the pool semaphore"
To view the discussion, visit: https://community.jboss.org/message/731567#731567
--------------------------------------------------------------
This issue was caused by the maxSessions size being larger than the MDB pool size.
With this configuration, the broker was dispatching messages to 20 activeMQ sessions and the sessions were attempting to deliver those 20 messages to 15 listeners. Because our listeners performed long running tasks, sometimes those in the wait queue would timeout.
I could recreate this issue consistently with 20 messages, 20 sessions and 5 listeners that slept for 30 seconds. I would see 5 messages received by the listeners and then after 10 seconds, the other 15 messages would error with "Failed to acquire the pool semaphore". Setting maxSessions to 5 resolves the issue as the broker will only attempt to deliver 5 messages at a time (remembering we also have prefetch set to 0).
I hope this helps someone.
Sam
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/731567#731567]
Start a new discussion in JBoss Messaging at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2042]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120423/5a94b667/attachment.html
More information about the jboss-user
mailing list