Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1793

OutOfMemoryError when loading more than several hundred thousand nodes in AS7.1.1 using BDBJE

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Blocker Blocker
    • 3.2.0.Final
    • 3.1.0.Final
    • JCR
    • None
    • Hide

      First, configure an Infinispan cache for Modeshape with a BDBJE cache loader. The attached standalone-modeshape.xml has a configuration for that, with the BDB and Lucene index files being stored in /tmp/modeshape. Eviction is enabled and max-entries is 500.

      Configure the required BDBJE modules in modules/org/infinispan/main/:
      infinispan-cachestore-bdbje-5.1.2.FINAL.jar
      je-4.0.92.jar

      Add these to modules/org/infinispan/main/module.xml

      Set the JVM max memory to 1GB. Start JBoss. Access the repository using the rest service to initialize the repository. (If you don't do this, deploying the EJB below sometimes fails - a separate issue.)

      Deploy the attached create-nodes-test.jar. This contains an asynchronous EJB with bean managed transactions. It attempts to create a million nodes in batches of 1000. The transaction is committed, session logged out, and a new session created in each batch. (Without the session logout, the OOM occurs very quickly. With it, it is much slower.)

      Let the program run and it will eventually crash, sometimes in different ways depending upon platform.

      The jconsole memory graphs are attached for a run on a 32 bit RHEL 5 machine.

      The Eclipse project for the create-nodes-test EJB jar is attached in create-nodes-test.zip

      Show
      First, configure an Infinispan cache for Modeshape with a BDBJE cache loader. The attached standalone-modeshape.xml has a configuration for that, with the BDB and Lucene index files being stored in /tmp/modeshape. Eviction is enabled and max-entries is 500. Configure the required BDBJE modules in modules/org/infinispan/main/: infinispan-cachestore-bdbje-5.1.2.FINAL.jar je-4.0.92.jar Add these to modules/org/infinispan/main/module.xml Set the JVM max memory to 1GB. Start JBoss. Access the repository using the rest service to initialize the repository. (If you don't do this, deploying the EJB below sometimes fails - a separate issue.) Deploy the attached create-nodes-test.jar. This contains an asynchronous EJB with bean managed transactions. It attempts to create a million nodes in batches of 1000. The transaction is committed, session logged out, and a new session created in each batch. (Without the session logout, the OOM occurs very quickly. With it, it is much slower.) Let the program run and it will eventually crash, sometimes in different ways depending upon platform. The jconsole memory graphs are attached for a run on a 32 bit RHEL 5 machine. The Eclipse project for the create-nodes-test EJB jar is attached in create-nodes-test.zip
    • Hide

      When running in AS7, try increasing the HEAP size to 1.5 or 2 GB.

      Show
      When running in AS7, try increasing the HEAP size to 1.5 or 2 GB.

      When attempting to load a million nodes in a repository backed by a BDBJE cache loader, the application consumes all memory and fails with an OOM exception, or other exception.

        1. standalone-modeshape.xml
          25 kB
          JonathanDFields
        2. heap-bdb.png
          82 kB
          JonathanDFields
        3. old-gen-bdb.png
          74 kB
          JonathanDFields
        4. histo-bdb.txt
          564 kB
          JonathanDFields
        5. jboss.txt
          129 kB
          JonathanDFields
        6. heap-bdb-query-disabled.png
          64 kB
          JonathanDFields
        7. histo-bdb-query-disabled.txt
          691 kB
          JonathanDFields
        8. jboss-query-disabled.txt
          381 kB
          JonathanDFields
        9. old-gen-bdb-query-disabled.png
          63 kB
          JonathanDFields
        10. jboss-query-disabled.txt
          56 kB
          JonathanDFields
        11. old-gen-bdb-no-user-transactions.png
          64 kB
          JonathanDFields
        12. visual_vm.png
          106 kB
          Horia Chiorean
        13. latest-heap.png
          112 kB
          JonathanDFields
        14. latest-jboss.txt
          204 kB
          JonathanDFields
        15. latest-old-gen.png
          86 kB
          JonathanDFields
        16. latest-snapshot.nps
          126 kB
          JonathanDFields
        17. NodeCreatorBean.java
          5 kB
          Horia Chiorean

            hchiorean Horia Chiorean (Inactive)
            jonathandfields_jira Jonathan Fields (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: