1 2 Previous Next 23 Replies Latest reply on May 9, 2012 5:02 AM by ataylor Go to original post
      • 15. Re: APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
        ataylor

        when you said you had tested with 4Gb and it worked i assumed you were changing the how much memory jboss is using, just try upping the memory.

        • 16. Re: APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
          varsha.g

          Hi Andy,

           

              

               For testing i've loaded the 100 000 messages via jmeter.

               Monitor the JMS Destinations admin console.

               In my case the "Messages Added" count goes on increasing and after some time it goes on decreasing then increasing vice-versa .

               Message Added count indicates the message added to queue. it will always increase. so why in my case it decreases.

               will this messages were lost?

               what is exactly happing in this case?

          • 17. Re: APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
            varsha.g

            Hi Andy,

                         I've attached the script. Please test it.

                        Download the war and .jmx file from this attachment.

                        Deploy the war on server.

                        And excute the attached shell script with following command.

                      

                         sh TestHornetQ.sh <path to .jmx file>.

            • 18. Re: APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
              clebert.suconic

              This is more about JVM tunning than HornetQ. If you are not consuming messages you need enough memory to deal with the load.

               

              I would suggest you configuring paging and use the disk for the extra ammount of messages.

              • 19. Re: APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
                varsha.g

                Hi Celbert,

                                I'm cousuming messages simultaneously. Also using pagging to store the messages on disk rather than memory.

                                 Here is my configuration for pagging in standalone-full.xml

                 

                                 <persistence-enabled>true</persistence-enabled>

                                <journal-file-size>102400</journal-file-size>

                                <journal-min-files>2</journal-min-files>

                 

                 

                                <address-settings>

                                    <address-setting match="#">

                                        <dead-letter-address>jms.queue.DLQ</dead-letter-address>

                                        <expiry-address>jms.queue.ExpiryQueue</expiry-address>

                                        <redelivery-delay>0</redelivery-delay>

                                        <max-size-bytes>1048576</max-size-bytes>

                                        <page-size-bytes>104857</page-size-bytes>

                                        <address-full-policy>PAGE</address-full-policy>

                                        <message-counter-history-day-limit>10</message-counter-history-day-limit>

                                    </address-setting>

                                </address-settings>

                • 20. Re: APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
                  varsha.g

                  Hi Andy,

                                Have you goen through the code and script ? Are you able reproduce the issues ? how system able to handle the 100000 threads without fail ?

                  • 21. Re: APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
                    ataylor

                    Ive spent an hour on your test this morning and:

                     

                    1. The war doesn't deploy, you havent given me a configuration I can use.

                    2. even if I add the queue it still fails, because of mis configuration.

                    3. The client script downloads jmeter and unpacks it every time, i had to fix the script so i could use it.

                     

                    If you want me to test this I need something I can use, a script that will:

                     

                    1. configure the server, deploy the war and start the server.

                    2 run a client (preferably not jmeter, just write your own client, jmeter spwans lots of threads and complicates things)

                     

                    Like clebert said before, this is just memory configuration, configure the AS with enough memory and all will work, we have customers that use HornetQ and handle millions of messages at a time.

                    • 22. Re: APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
                      varsha.g

                      Hi Andy,

                       

                                       Thanks lot for your help .

                       

                       

                       

                                 I'm starting the jboss with following command.

                       

                                         --- sh standalone.sh --server-config=standalone-full.xml

                       

                                             And  tried to deploy war, war deployed the successfully on server.

                       

                       

                       

                               I'm little bit doubtful about my configuration for the HornetQ.

                       

                       

                       

                               Can you please check the configuartion,

                       

                       

                       

                                Configuration under the standalone-full.xml

                       

                       

                       

                                     <persistence-enabled>true</persistence-enabled>

                       

                                      <journal-file-size>102400</journal-file-size>

                       

                                      <journal-min-files>2</journal-min-files>

                       

                       

                       

                       

                       

                                      <address-settings>

                       

                                          <address-setting match="#">

                       

                                              <dead-letter-address>jms.queue.DLQ</dead-letter-address>

                       

                                              <expiry-address>jms.queue.ExpiryQueue</expiry-address>

                       

                                              <redelivery-delay>0</redelivery-delay>

                       

                                              <max-size-bytes>1048576</max-size-bytes>

                       

                                              <page-size-bytes>104857</page-size-bytes>

                       

                                              <address-full-policy>PAGE</address-full-policy>

                       

                                              <message-counter-history-day-limit>10</message-counter-history-day-limit>

                       

                                          </address-setting>

                       

                                      </address-settings>

                       

                       

                              JMS Producre Code

                       

                                 Context ic = null;

                       

                              QueueConnectionFactory cf = null;

                       

                              Connection connection = null;

                       

                              MessageProducer publisher = null;

                       

                              Session session = null;

                       

                              try {

                       

                                 ic = new InitialContext();

                       

                                  //Lookup the connection factory

                                  //java:/JmsXA which is the pooled connection factory provider

                       

                                  cf = (QueueConnectionFactory) ic.lookup("java:/JmsXA");

                       

                                 Queue queue = (Queue) ic.lookup(destinationName);

                       

                                  connection = cf.createConnection();

                       

                                  session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

                       

                                  //Create a JMS Message Producer to send a message on the queue

                       

                                 publisher = session.createProducer(queue);

                       

                                  connection.start();

                       

                                  // Created the Bean to send as Object Message

                       

                                  FeedbackMessageBean mymesage = new FeedbackMessageBean();

                       

                                  ObjectMessage msg = session.createObjectMessage(mymesage);

                       

                                  publisher.send(msg);

                       

                       

                              } catch (Exception exc) {

                       

                                  exc.printStackTrace();

                       

                              } finally {

                       

                                  if (ic != null) {

                       

                                      try {

                                          ic.close();

                                      } catch (NamingException e) {

                       

                                                e.printStackTrace();

                                     }

                       

                                }

                                  if (session != null) {

                       

                                      try {

                       

                                       session.close();

                       

                                      } catch (JMSException e) {

                       

                                          // TODO Auto-generated catch block

                       

                                          e.printStackTrace();

                       

                                      }

                       

                                  }

                       

                                  if (connection != null) {

                       

                                      try {

                       

                                          connection.close();

                       

                                      } catch (JMSException e) {

                       

                                          e.printStackTrace();

                       

                                      }

                       

                                  }

                              }

                       

                            Also I've attached the standalone-full.xml.

                           Please, Let me know if configuration is correct.

                       

                      Thanks in Advance.

                      • 23. Re: APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
                        ataylor

                        Ive played around with this and have a few points to talk you thru as I am not sure you understand how jmeter works. If you look in your config you will see the following:

                         

                        <stringProp name="LoopController.loops">1</stringProp>

                        <stringProp name="ThreadGroup.num_threads">100000</stringProp>

                         

                        This basically controls how many clients there are and how many messages they send, so here you are creating 100000 clients each only sending 1 message, this is probably unrealistic, it won't run on my machine. You are basically creating a 100000 threads, each connecting to the server at the same time opening 100000 sockets and sending 100000 messages at the same time which will try and aquire 100000 threads on the server, on my machine i run out of file handles pretty quickly. Obviously you are going to have memory issues unless you have the appropriate hardware.

                         

                        I changed your config to 100 clients each sending 10000 messages and succesfully sent a million messages.

                         

                        What you need to do is take a step back and think about what you are trying to acheive and then configure jmeter to something sensible.

                        1 2 Previous Next