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&...]