5 Replies Latest reply on Oct 15, 2001 2:54 PM by Ashu

    Memory problem?

    ocquidant Newbie


      I am confronted to a memory problem, or perhaps it's not a problem but i have no explanation.

      I use jboss with large arrays that I store in the database using Blobs. In order to optimize memory ressource I have choosen the C commit option to not use the cache (I can't use the cache, my objects are too big).
      To give you an idea, i have 25 entity beans, each with 8 MB array fields. The jboss JVM grows up to 400 MB! Even if the beans were all resident memory, they should occupate about 200 MB. Since i use the C commit option, this is not true because the containers should passivate beans after each transaction.
      I don't understand why the server JVM grows up to 400MB.
      Another thing seems a bit strange to me. At the end of my tests, the server display lot of ejbPassivate() messages (messages that I wrote in the corresponding methods) and the JVM memory doesn't shrink.

      Of course my bean fields are transient so the passivation should not consider them (i've also tried to put them to null in ejbPassivate()).

      Do someone have experienced a similar problem?

      Thanks a lot.


        • 1. Re: Memory problem?
          JEANNE Newbie

          We had an OUT OF MEMORY problem with a Serializable object put in a Blob with transcient fields too.
          Note that a serializable object carry all the informations of its related classes not only the usefull member data, this can explain a so big memory space used.

          'cause we want a working product quick we have decided to create a Session bean with direct
          database connections ... and it works now !

          But I would like the have the answer to the question "why does Jboss container don't passivate CMP beans when memory is missing ...".

          I'm not sure of the question and I don't know the Jboss container enough to answer.

          Any JBoss GURU here ? ;-)


          We use Jboss 2.4.1 + mySQL.

          • 2. Re: Memory problem?
            Ashu Newbie

            can u tell me how do u get the Memory usage of the JVM.

            • 3. Re: Memory problem?
              ocquidant Newbie

              oh... only by launching the unix utility: top


              • 4. Re: Memory problem?
                ocquidant Newbie

                I forgot to tell you, it was with the cloudscape database. When i switch to mySQL (or postgresQL) all works fine....


                • 5. Re: Memory problem?
                  Ashu Newbie

                  i had a similar problem of too much passivation ..... so i explicitly removed my bean objects once they were not in use. beanObj.remove()... it worked fine ..atleast the server load went down.