6 Replies Latest reply on Feb 20, 2004 9:06 AM by spageau

    Memory problems

    B. Dobalina Newbie

      I'm using JBoss v3.0.0BETA with everything turned off except JMS and a few other things. My problem is once messages are posted to a topic they never seem to be garbage collected--even after they are delivered. I have no durable subscribers. After 30,000 or so messages JBoss gives the OutOfMemoryError and I must restart.
      In ps I can see the memory usage of the jboss processes keep going up and up and never coming down. This only happens when I have subscribers connected, not when I post messages to an empty channel. It doesn't matter whether the subscribers are on the same machine or a different one than jboss. And the memory is not freed even when I kill all the subscriber processes.

      as an example, here is the memory usage of jboss under the following conditions:
      Right after startup, 0 messages - 28888
      right after 2000 messages posted and consumed - 32900
      about 2 minutes after this (no other postings) -32900
      then after another 2000 posted and consumed - 35820
      after subscribers are killed - 35864

      This keeps up until it exhausts my memory. Any suggestions?


        • 1. Re: Memory problems
          Peter Antman Expert

          There are probably several things going one here:

          One is that there is a message pool wich will pool up to 10 000 messages. This will never be garbage collected.

          The other thing is that the message cache feature is probably turned of by default.

          Does your jbossmq-service.xml contain this?

          <depends optional-attribute-name="CacheStore">jboss.mq:service=CacheStore

          Well, you will have to tune this to match your settup. Say that you give the JVM 256M (-Xmx256m), you would probably then want to set MaxMemoryMark to 180 and HighMemoryMark to 140. Or something like that.


          • 2. Re: Memory problems
            Raj Saini Newbie


            I am using the JBoss 3.0 RC1. I am having memory problems. The Jboss goes after out of memory after running few hours.

            I have heavy uses of JMS wherby JMS client sends 2-3 messages per second on non-durable topics. The messages are consumbe by subsribers and if not consumed within 10 seconds.

            My EJB requiremtn is very basic where I have less then 10 EJBs which use the BMP and my datasource is Oracle 8.0.1

            I have a compaq system with 512 MB RAM. my Xmx is 384 MB and I have set the MaxMemoryMark to 160 and HighMemoryMark to 128 in the jbossmq-service.xml.

            Please suggest if there are any performace tuning of the Jboss 3.0 RC1. How can I avoid this out of memory problem.


            • 3. Re: Memory problems
              Hiram Chirino Expert

              I posted this on some other threads, but if you were using selectors with you r subscribers, then there WAS a message leak in the server. This is now fixed in the CVS, and should be included in JBoss 3.0 RC2


              • 4. Re: Memory problems
                Stephen Kendorski Newbie

                I've got the same problem: JBoss 3.0.0 JBossMQ, 1 non-durable test-topic, multiple publishers and subscribers (using selectors). With really low (or zero) High/MaxMemoryMark values, CPU usage is way-up and messaging performance is awful, uping the values just postpones the problem. I am just unzipping the download, using the default server and running. Nothing fancy.

                How do I get JBossMQ to run for an extended period without a performance hit cleaning up non-persistent messages?

                I tried using the "rollinglogged" PersistenceManager but on Server start-up of jbossmq-service.xml I get a:
                DeploymentException, unable to locate method for: getInstance(), etc.

                What am I missing here?

                • 5. Re: Memory problems
                  rboston Newbie

                  I've got the same problems with no persistence on the 3.0 version.
                  I connect one topic subscriber and all hell breaks loose in memory and the cpu gets pretty eratic too.
                  After a while the highmemory mark is exceeded and disk writes kill the system.

                  • 6. Re: Memory problems
                    spageau Newbie

                    I am experiencing the same problem as the one posted first by bdobalina but with JBoss3.2.3.
                    I have reduced cache to 12 for high mem and 24 for mam mem and it does not help. What can I do?