2 Replies Latest reply on Nov 8, 2005 4:26 AM by Kariem Hussein

    JMS persistent store getting too big

    Kariem Hussein Newbie

      Hi,

      I think it is rather a configuration issue; please point me to the right place to ask this question, if it is not in the correct place here.

      The default configuration for JBoss 4.0.1sp1 uses HSQLDB as persistence for the JMS destinations. After running our application for about 8 months we encountered a strange issue two weeks ago:

      A bug in an application caused the DB files (localDB.data) to rise to more than 1 GB within several minutes. The bug was resolved but JBoss could not be restarted, only after cleaning tmp/work/undeploy directories and the message store.

      I know that HSQLDB is not recommended for production, although I read only good things about the new release. I do not think, using a different DB resolves problems like this. Could you tell me how to change the following parameters:



        • 1. Re: JMS persistent store getting too big
          Elias Ross Master


          JBoss has an inherit problem where if you restart the server with too many messages in the DB (does not matter which one) it won't come up. (You get out of memory errors.) There was a patch for this (lazy-loading queues) but had some flaws.

          * Set the queue size to a maximum (no. of messages, total size ...)

          Take a look at the JMX console for the queues. (You can limit by number, but not by size)

          * Remove old messages automatically (timeout) without changes on the JMS clients

          You can add a message interceptor. Download the source from CVS. There is a tracing interceptor you can adopt to set the expiration header.

          * Use the DEFRAG function from HSQLDB

          1.8, at least the one bundled with JBoss 4.0.3 automatically defrags. You can increase the size to 8GB as well.

          • 2. Re: JMS persistent store getting too big
            Kariem Hussein Newbie

            Sorry for the late reply. Thank you very much for the great answers. Really helpful!

            Kariem