0 Replies Latest reply on Oct 6, 2008 4:51 AM by Emeka Kanu

    Thread pile up issue with JBoss 4.0.5GA and JBoss Messaging

    Emeka Kanu Newbie

      Hello All,
      We have an environment at my current place of employment where we deploy an application in a JBoss 4.0.5GA (we will call this applicationA) server and JBoss Messaging 1.0.1 SP5 (messaging server) on another Box in another Jboss container. There is a third application which acts as a gateway and posts request messages on a queue. ApplicationA is setup to listen to the request queue via Spring Configurations (Listener Container) and posts responses using a JMSTemplate.

      Now before anyone jumps the gun to tell me how badly the Spring JMSTemplate is with JBoss Messaging, please note that I have read the documentation and I accept that there might be some issues with that. However, we have been able to use this setup for at least a good month without any problems until now. Now, we have noticed a pileup up threads going as high as over 10K threads at one point. At this point, nothing works. Messages cannot be placed on the queues, or picked up from the queues.

      Also, please note that before you tell me to upgrade to Jboss 4.2 and a higher version of Messaging, I would like to know what is wrong with the versions I currently have. I also have a few questions which I hope somebody will be able to answer.

      1.) The Web Console Screen shows the number of threads. If this number relates to the total number of threads, How does one
      i.) Create configurations to reduce the number of threads being used at any one time?
      ii.) Configure the Application server so that unused threads are returned to the pool as soon as possible?
      iii.) Identify which threads are created because of the Jms connections and which threads are created for other purposes like the Http endpoints etc?
      iv.) Limit the existence of other threads so that JMS Services are of a higher priority?
      2.) The Redhat documentation says :
      5.2. Changing the Database
      The JMS service in the JBoss AS uses relational databases to persist its messages. For improved performance, you should change the JMS service to take advantage of the external database

      Pasted from <http://www.redhat.com/docs/manuals/jboss/jboss-eap-4.3/doc/messaging/JBoss_Messaging_User_Guide/html/conf.changingds.html>

      i.) How does changing the external database improve the performance?
      ii.) Does it free up resources somewhere? And where?

      3.) In terms of the Queues
      i.) How do they store/reference messages
      ii.) Is there any impact of a high number of messages arriving on a queue at any point in time against the number of threads?
      iii.) What work do the threads created actually perform on a queue?