6 Replies Latest reply on Nov 2, 2009 9:54 AM by mayureshk

    JBoss 4.2.3 GA, JBoss Messaging 1.4.2 SP1 GA and Worker Thre

      I will appreciate any insight regarding the behavior observed with JBoss 4.2.3 GA, JBoss Messaging and Worker Threads.

      The JBoss 4.2.3 GA is running on Windows XP (SP 3) and uses jdk1.6.0_12.
      The server is configured to use JBoss Messaging jboss-messaging-1.4.2.GA-SP1 (instead of JBoss MQ provided with JBoss 4.2.3 GA).

      Two mbean sections in jboss-service.xml were modified
      to configure limited number of threads in the pool
      1. org.jboss.invocation.pooled.server.PooledInvoker
       MaxPoolSize=15
       ClientMaxPoolSize=15
       SocketTimeout=60
      
      2. org.jboss.remoting.transport.Connector (Configuration subsection)
       maxPoolSize=15
       clientMaxPoolSize=15
       socketTimeout=60


      The Topic example supplied with the jboss-messaging-1.4.2.GA-SP1 examples directory was modified to simulate a client that is doing some work. A call to Thread.sleep() for 120 seconds was added just before releasing resources (i.e. before closing the InitialContext and connection in the finally block).

      Threads were monitored using jvisualvm (provided by the JDK).

      After starting the JBoss server there were 57 live threads, 35 daemon threads, there were no Worker Threads.

      To simulate multiple clients publishing to a Topic and listening for replies; 25 instances of the Topic example were started in quick succession. The live thread count on the JBoss server went up to 136 of which 49 were Worker Threads (in running state).

      After all the clients completed their sleep time (120 seconds) the client JVMs exited. At this point the JBoss server showed 106 live threads, 35 daemon threads. There were 49 Worker Threads in waiting state. All Worker threads remained in memory (in waiting state) even after an hour had passed with no activity (no requests) on the server.

      Is it ok to expect that some Worker threads are closed by the server bringing down the live threads count due to inactivity for an hour?
      Are there any parameters in JBoss that need to be changed to maintain the desired number of Worker Threads after a period of inactivity?

      Thanks for reading this post, any inputs or suggestions throwing light on the observed behavior is welcome.

        • 1. Re: JBoss 4.2.3 GA, JBoss Messaging 1.4.2 SP1 GA and Worker
          gaohoward

          It could be a JBoss Remoting issue. What version of JBoss Remoting are you using? Also please post your issue to the remoting forum also, you may get a quicker answer from there.

          Howard

          • 2. Re: JBoss 4.2.3 GA, JBoss Messaging 1.4.2 SP1 GA and Worker

            Hi Howard,

            Thankyou for your response. I will post the issue to JBoss Remoting forum.
            The JBoss Remoting version is 2.2.2.SP8 the one that came with JBoss AS 4.2.3 GA (haven't upgraded the JBoss Remoting version).

            Contents of Manifest.mf file in jboss-remoting.jar are shown below:
            
            Manifest-Version: 1.0
            Specification-Title: JBoss
            Built-By: rsigal
            Created-By: 1.5.0_06-b05 (Sun Microsystems Inc.)
            Specification-Version: 4.2.3.GA
            Implementation-Vendor-Id: http://www.jboss.org/
            Implementation-URL: http://www.jboss.org/
            Created-On: 2008-06-23 10:21:20
            Ant-Version: Apache Ant 1.7.0
            Main-Class: org.jboss.remoting.Version
            Implementation-Title: JBoss [Trinity]
            Specification-Vendor: JBoss (http://www.jboss.org/)
            Implementation-Version: 4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=20
             0807181417)
            Implementation-Vendor: JBoss Inc.
            
            Name: JBossRemoting
            Specification-Title: JBossRemoting
            Implementation-Title: JBossRemoting
            Specification-Vendor: JBoss Inc.
            Specification-Version: 2.2.2.SP8
            Implementation-Vendor-Id: http://www.jboss.org
            Implementation-Version: 2.2.2.SP8
            Implementation-Vendor: JBoss Inc.
            


            • 3. Re: JBoss 4.2.3 GA, JBoss Messaging 1.4.2 SP1 GA and Worker
              gaohoward

              The correct remoting version for JBM 1.4.2.sp1 is 2.2.2.SP11. You can try that version and see if problem still exists.

              Also the latest release for AS 4.x is 1.4.5.GA with remoting 2.2.3.sp1. You can also try it.

              Howard

              • 4. Re: JBoss 4.2.3 GA, JBoss Messaging 1.4.2 SP1 GA and Worker

                Thanks for your suggestions.

                The JBoss 4.2.3 GA default Remoting package was upgraded to JBoss Remoting version to 2.2.2 SP11. After running the test again I saw no change in the behavior i.e. the worker thread count reaches a high water mark and stays there. All the Worker threads remain in waiting state after all clients have disconnected. Even after there is no activity on the server for over 20 minutes none of the Worker threads are closed.

                I tried to download JBoss Messaging 1.4.5 GA but the zip file that gets downloaded appears to be invalid/corrupted. Download completes within a minute but WinZip reports corrputed file on attempt to open the file.

                • 5. Re: JBoss 4.2.3 GA, JBoss Messaging 1.4.2 SP1 GA and Worker
                  gaohoward

                  Hi are you downloading from here:
                  http://www.jboss.org/downloading/?projectId=jbossmessaging&url=/jbossmessaging/downloads/jboss-messaging-1.4.5.GA.zip

                  I tried on Linux the zip file is ok. I'll try it on Windows later.
                  If it's corrupted, i'll update it.

                  Thanks.
                  Howard

                  • 6. Re: JBoss 4.2.3 GA, JBoss Messaging 1.4.2 SP1 GA and Worker

                    Thanks Howard, I was able to download the JBoss Messaging zip file on Windows platform and this time around it was correctly downloaded.

                    I upgraded to JBoss Messaging 1.4.5.GA and JBoss Remoting 2_2_3_SP1 however there is no change in my observations. The Worker Threads still remain in memory after a period of no activity on the server.

                    By the way I thought of mentioning that if you try to run the Topic example included with JBoss Messaging by running the build.xml, it refers to a file examples.properties that is missing from the examples directory (in the downloaded zip file) . I am not sure if this was excluded on purpose.

                    Please do let me know if you would like me to try something else and thanks again for your help.