14 Replies Latest reply on Aug 23, 2011 6:45 PM by clebert.suconic

    Paging and Persistence disabled

    zenzei2k

      One easy question, my application doesn't need message persistence, so i disabled it in hornetq-configuration.xml with the persistence-enabled tag. Is it ok to suppose that paging settings doesn't need to be tweak cause they aren't used at all?

      Reading the docs here http://hornetq.sourceforge.net/docs/hornetq-2.0.0.GA/user-manual/en/html/persistence.html#persistence.enabled it seems that, but I want to confirm it. Or I'm misunderstaning something?

       

      Thanks in advance!

        • 1. Paging and Persistence disabled
          clebert.suconic

          that's correct

          • 2. Re: Paging and Persistence disabled
            zenzei2k

            Thanks Clebert! One more question, does this https://issues.jboss.org/browse/HORNETQ-353 has something to do with my question? I don't understand very well the issue, but I'm using HornetQ 2.0.0 and I want to know if it's worth to update.

             

            Best regards,

            • 3. Re: Paging and Persistence disabled
              clebert.suconic

              2.0.0 is really, really old...

               

               

              you should go straight to 2.2.2 or maybe EAP TP (that has a few bug fixes already)

              • 4. Re: Paging and Persistence disabled
                clebert.suconic

                Tha issue has nothign to do with it BTW: that was just a code mistake and the JIRA was about fixing it.

                • 5. Re: Paging and Persistence disabled
                  zenzei2k

                  Sorry to open this thread again, but I'm having some problem and I don't know what's happening.

                   

                  I have Jboss 4.2.3 with HornetQ 2.2.5, and configure it without persistence (configuration attached).

                   

                  After some hours of normal operation I see there is are almost 1GB in the data\hornetq\paging folder. And if I restart the Jboss instance I'm getting and OutOfMemory error and a lot of these lines

                   

                  ....

                  2011-08-11 18:33:17,046 21562 DEBUG [org.hornetq.core.paging.impl.PageImpl] (Thread-1 (group:HornetQ-server-threads18799851-25059489):) reading page 441 on address = jms.topic.bingo90ManualEventTopic

                  2011-08-11 18:33:17,046 21562 DEBUG [org.hornetq.core.paging.impl.PageImpl] (Thread-1 (group:HornetQ-server-threads18799851-25059489):) reading page 442 on address = jms.topic.bingo90ManualEventTopic

                  2011-08-11 18:33:17,046 21562 DEBUG [org.hornetq.core.paging.impl.PageImpl] (Thread-1 (group:HornetQ-server-threads18799851-25059489):) reading page 443 on address = jms.topic.bingo90ManualEventTopic

                  2011-08-11 18:33:17,046 21562 DEBUG [org.hornetq.core.paging.impl.PageImpl] (Thread-1 (group:HornetQ-server-threads18799851-25059489):) reading page 444 on address = jms.topic.bingo90ManualEventTopic

                  2011-08-11 18:33:17,046 21562 DEBUG [org.hornetq.core.paging.impl.PageImpl] (Thread-1 (group:HornetQ-server-threads18799851-25059489):) reading page 445 on address = jms.topic.bingo90ManualEventTopic

                  2011-08-11 18:33:17,046 21562 DEBUG [org.hornetq.core.paging.impl.PageImpl] (Thread-1 (group:HornetQ-server-threads18799851-25059489):) reading page 446 on address = jms.topic.bingo90ManualEventTopic

                  2011-08-11 18:33:17,046 21562 DEBUG [org.hornetq.core.paging.impl.PageImpl] (Thread-1 (group:HornetQ-server-threads18799851-25059489):) reading page 447 on address = jms.topic.bingo90ManualEventTopic

                  2011-08-11 18:33:17,062 21578 DEBUG [org.hornetq.core.paging.impl.PageImpl] (Thread-1 (group:HornetQ-server-threads18799851-25059489):) reading page 448 on address = jms.topic.bingo90ManualEventTopic

                  2011-08-11 18:33:17,062 21578 DEBUG [org.hornetq.core.paging.impl.PageImpl] (Thread-1 (group:HornetQ-server-threads18799851-25059489):) reading page 449 on address = jms.topic.bingo90ManualEventTopic

                  2011-08-11 18:33:17,062 21578 DEBUG [org.hornetq.core.paging.impl.PageImpl] (Thread-1 (group:HornetQ-server-threads18799851-25059489):) reading page 450 on address = jms.topic.bingo90ManualEventTopic

                  2011-08-11 18:33:17,062 21578 DEBUG [org.hornetq.core.paging.impl.PageImpl] (Thread-1 (group:HornetQ-server-threads18799851-25059489):) reading page 451 on address = jms.topic.bingo90ManualEventTopic

                  2011-08-11 18:33:17,062 21578 DEBUG [org.hornetq.core.paging.impl.PageImpl] (Thread-1 (group:HornetQ-server-threads18799851-25059489):) reading page 452 on address = jms.topic.bingo90ManualEventTopic

                  2011-08-11 18:33:17,062 21578 DEBUG [org.hornetq.core.paging.impl.PageImpl] (Thread-1 (group:HornetQ-server-threads18799851-25059489):) reading page 453 on address = jms.topic.bingo90ManualEventTopic

                  2011-08-11 18:33:17,093 21609 DEBUG [org.hornetq.core.paging.impl.PageImpl] (Thread-1 (group:HornetQ-server-threads18799851-25059489):) reading page 454 on address = jms.topic.bingo90ManualEventTopic

                  2011-08-11 18:33:17,093 21609 DEBUG [org.hornetq.core.paging.impl.PageImpl] (Thread-1 (group:HornetQ-server-threads18799851-25059489):) reading page 455 on address = jms.topic.bingo90ManualEventTopic

                  2011-08-11 18:33:17,093 21609 DEBUG [org.hornetq.core.paging.impl.PageImpl] (Thread-1 (group:HornetQ-server-threads18799851-25059489):) reading page 456 on address = jms.topic.bingo90ManualEventTopic

                  ....

                   

                  ---------------------------------------------------------

                   

                  2011-08-11 18:41:38,062 349875 ERROR [org.hornetq.utils.OrderedExecutorFactory] (Thread-23 (group:HornetQ-server-threads28483456-8560954):) Caught unexpected Throwable

                  java.lang.OutOfMemoryError

                      at sun.misc.Unsafe.allocateMemory(Native Method)

                      at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:99)

                      at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)

                      at org.hornetq.core.paging.impl.PageImpl.read(PageImpl.java:119)

                      at org.hornetq.core.paging.cursor.impl.PageCursorProviderImpl.getPageCache(PageCursorProviderImpl.java:184)

                      at org.hornetq.core.paging.cursor.impl.PageCursorProviderImpl.getPageCache(PageCursorProviderImpl.java:136)

                      at org.hornetq.core.paging.cursor.impl.PageSubscriptionImpl.internalGetNext(PageSubscriptionImpl.java:332)

                      at org.hornetq.core.paging.cursor.impl.PageSubscriptionImpl.access$1500(PageSubscriptionImpl.java:65)

                      at org.hornetq.core.paging.cursor.impl.PageSubscriptionImpl$CursorIterator.moveNext(PageSubscriptionImpl.java:1146)

                      at org.hornetq.core.paging.cursor.impl.PageSubscriptionImpl$CursorIterator.next(PageSubscriptionImpl.java:1103)

                      at org.hornetq.core.paging.cursor.impl.PageSubscriptionImpl$CursorIterator.hasNext(PageSubscriptionImpl.java:1258)

                      at org.hornetq.core.server.impl.QueueImpl.deliver(QueueImpl.java:1633)

                      at org.hornetq.core.server.impl.QueueImpl.access$900(QueueImpl.java:72)

                      at org.hornetq.core.server.impl.QueueImpl$DeliverRunner.run(QueueImpl.java:2271)

                      at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100)

                      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                      at java.lang.Thread.run(Thread.java:619)

                   

                   

                  Anyone knows what the problem could be? I don't understand very well why I'm getting the page folder with a lot of space used and the 'reading page XX' in the log, when I explicitly configured HornetQ to not persist messages but discard them.

                   

                  Thanks in advance!!!

                  • 6. Re: Paging and Persistence disabled
                    clebert.suconic

                    It seems you are not acking messages on consumption or you have a dead jms subscription or core queue

                    • 7. Re: Paging and Persistence disabled
                      zenzei2k

                      Hi Clebert, thanks for your response.

                       

                      I suppose is not an acknowledge problem cause I'm preacknowleging messages. I configured the session both in the sender and the receiver with

                       

                      connection.createSession(false, HornetQJMSConstants.PRE_ACKNOWLEDGE);
                      

                       

                      before sending any message. Is this ok?

                       

                      So if not an acknowledge problem, you say it could be a dead jms subscription or core queue. That could make paging to start although configured hornetq for not persistence?

                      What can I do to detect a jms subscription or core queue that's dead, or to prevent this happening? Is there any configuration I can tweak?

                       

                      Sorry if it's a newbie question, I really don't have a big expertise with this kind of problems.

                       

                      Thanks in advance!

                      • 8. Re: Paging and Persistence disabled
                        clebert.suconic

                        One option would be to look at the JMX console through jconsole and look for queues on the address.

                         

                         

                        Another option would be to use print-data tool on the journal and look for queues created.

                        • 9. Re: Paging and Persistence disabled
                          zenzei2k

                          tOk, I will run both tools when the problem arise and save the logs to analyze them.

                           

                          By the way I recently tested the printData.sh/printPages.sh and after executing some files appear in the hornetq/journal folder

                           

                          hornetq-data-1.hq

                          hornetq-data-2.hq

                          hornetq-data-3.hq

                          hornetq-data-4.hq

                           

                          And in the hornetq/paging folder

                          hornetq-bindings-1.bindings

                          hornetq-bindings-2.bindings

                           

                          And some warning messages

                          WARNING: Directory data\hornetq\paging\hornetq-bindings-1.bindings didn't have an identification file address.txt

                          WARNING: Directory data\hornetq\paging\hornetq-bindings-2.bindings didn't have an identification file address.txt

                           

                          What these files and warnings mean?

                           

                          About my previous question of the pre ackwonledge mode is it configured right? It's ok to suppose that with this mode I don't need to ack the message on every queue, and they will be inmediately release and not stored or trigger pagination, or I'm wrong?

                           

                          Thank you very much Clebert!

                          • 10. Re: Paging and Persistence disabled
                            clebert.suconic

                            You probaboy run the tool in a wrong directory, making it create the files where it wasn't supposed to be

                            • 11. Re: Paging and Persistence disabled
                              clebert.suconic

                              I have a print-data.sh script defined on my ~/.bin (on my PATH):

                               

                               

                              java -Djava.util.logging.config.file=/home/clebert/logging.properties -cp /work/hornetq/trunk/build/jars/hornetq-logging.jar:/work/hornetq/trunk/build/jars/hornetq-core.jar:/work/hornetq/trunk/thirdparty/org/jboss/netty/lib/netty.jar org.hornetq.core.persistence.impl.journal.PrintData $1 $2

                               

                               

                               

                              I then run: print-data.sh bindings-folder journal-folder

                               

                               

                              The tool is going to print the content for both the bindings and message journal.

                               

                              You should be able to see the queues you have created. It's a record-by-record view though.

                              • 12. Re: Paging and Persistence disabled
                                clebert.suconic

                                If you can't figure out.. you could place the txt here (as an attachment please... switch to advanced editor and attach it).. and I will help you understand the file.

                                • 13. Re: Paging and Persistence disabled
                                  zenzei2k

                                  I run the tools from the Jboss default server folder as

                                   

                                  java -cp ./lib/hornetq-core.jar;./lib/netty.jar org.hornetq.core.persistence.impl.journal.PrintData data\hornetq\paging data\hornetq\journal

                                  and

                                  java -cp ./lib/hornetq-core.jar;./lib/netty.jar org.hornetq.core.paging.PrintPages data\hornetq\paging data\hornetq\journal

                                   

                                  Is it wrong?

                                  • 14. Re: Paging and Persistence disabled
                                    clebert.suconic

                                    Yes... printData: you run it for bindings and journal...

                                     

                                     

                                    PrintData: it will print the journal

                                     

                                    printPages... paging and journal

                                     

                                    PrintPages: it will print the data on the pages...

                                     

                                     

                                     

                                    BTW: I have writtent these tools as a debug tool for myself, and people started using it... It's an area we need to make some improvements on the way this reports stuff.