7 Replies Latest reply on Mar 24, 2003 2:16 PM by adrian.brock

    JBossMQ memory issue

    aaronh

      When running Java Heap Inspector on JBoss to track down an OutOfMemory error, there were an increasing number of java.io.BufferedInputStreams and java.io.BufferedOutputStreams listed as being in memory. I tried to track down the root references of these objects, to see why they weren't being garbage collected, and found that they were being created in two main places:

      The first place was in a thread created by org.jboss.mq.il.oil.OILClientILService. Drilling down further into the references revealed: org.jboss.mq.SpyConnection, org.jboss.mq.Connection$PingTask, EDU.oswego.cs.dl.util.concurrent.ClockDaemon$TaskNode, org.jboss.mq.SpyConnection, org.jboss.mq.Connection$PingTask, and so-on in a loop.

      The second place was in a java.io.DataInputStream, created by org.jboss.mq.il.oil.OILClientIL, which was itself created by an instance of org.jboss.mq.ConnectionToken.

      Has anybody else experienced this problem with an increasing number of BufferedInputStreams and BufferedOutputStreams being created, and could they advise me of a solution?

        • 1. Re: JBossMQ memory issue
          cholliday

          I had memory issues until I set up my initial & max memory allowances for the JVM when starting up the JBoss instance. If you haven't done that I would try it.

          • 2. Re: JBossMQ memory issue
            aaronh

            Thanks for your suggestion, but we are already setting the min and max memory allowances for the JVM, and it doesn't fix this problem.

            Does anyone have any other ideas?

            • 3. Re: JBossMQ memory issue
              cholliday

              What version of jboss are you running? They put a fix in for a memory probblem in version 3.0.4.

              I also eliminated much of my persistant messages at the same time as changing my min and max memory change. I don't know which one actually worked.

              • 4. Re: JBossMQ memory issue
                alchemista

                I'm not sure what version you're using, but we found JBossMQ unusable for high load applications until version 3.2.0-RC2. The RC2 release still does not perform well under heavy load, but it does a lot better than the previous versions.

                I used it after seeing a post that the MessageCache was optimized in that version.

                • 5. Re: JBossMQ memory issue
                  losmurfs

                  When I use version 3.0.6 I get an OutOfMemory error but when I run 3.0.4 I don't, I suspect that 3.0.4 had a bug fix that they accidently left out of 3.0.6.

                  • 6. Re: JBossMQ memory issue

                    server/default/deploy/jbossmq-service.xml


                    500
                    600

                    Adjust these to fit your jvm config.
                    The default size for a Sun JVM is 64 (megabytes)
                    so use something like 50 and 60

                    Or use -Xmx switch on the java command in
                    run.bat/run.sh to change the JVM's memory.

                    Regards,
                    Adrian

                    • 7. Re: JBossMQ memory issue

                      Incidently, the message cache changes will
                      appear in 3.0.7

                      Regards,
                      Adrian