[jboss-user] [Performance Tuning] - WorkerThread Reutilisation and JMS [JBoss 5.1]

Michael Faber do-not-reply at jboss.com
Mon Jun 6 10:53:43 EDT 2011

Michael Faber [http://community.jboss.org/people/michael.faber] created the discussion

"WorkerThread Reutilisation and JMS [JBoss 5.1]"

To view the discussion, visit: http://community.jboss.org/message/608766#608766

Hi JBoss Community,

i am having some configuration problems with JMS and the corresponding WorkerThreads from the ThreadPool.

I experienced some OutOfMemory exceptions when running some bigger batch jobs on the server side that are triggered using JMS. Looking at the application with the VisualVM tool i saw that JBoss is spawning a big amount of WorkerThreads (up to 100, which is the default configuration value) which process the JMS messages.
Since the configuration for JMS is to work with max 15 concurrent threads, i would expect JBoss to resuse old WorkerThreads, if there is one available in state "waiting" (i.e. a WorkerThread already spawned, that completed processing). The result i got is, that JBoss starts reusing old threads only if the limit of configured WorkerThreads is reached, i.e. if 100 WorkerThreads are started, JBoss will use an existing Thread for the next JMS message, since it is not allowed to spawn a new one.
Therefore we have a lot of 'idle' WorkerThreads that consume memory which lead to the OOM exception in the end. As a workaround i can limit the size of the WorkerThreadPool, however i was wondering if this is the wanted behaviour for the application server.

I had a look around Google and found some JBoss WorkerThread issues with JMS when Connections/Sessions/Senders are not closed ( http://community.jboss.org/message/157561#157561 http://community.jboss.org/message/157561). I checked the code to send messages to JMS for this issue, however these suggestions did not help to reuse WorkerThreads in my case. 

Hence, the following questions:

1) Is the issue described in the thread above still an issue in JBoss 5.1 ?
2) Is the described behaviour (the full utilisation of all possible WorkerThreads) the wanted behaviour or should old WorkerThreads be reutilized by JBoss before spawning new ones ?
3) Is there any configuration i missed that i can use to configure JMS or the JBoss behaviour on this part ?

Any feedback is appreciated, thanks for your time.

Reply to this message by going to Community

Start a new discussion in Performance Tuning at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110606/3d5320cf/attachment.html 

More information about the jboss-user mailing list