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

Details

    • Bug
    • Resolution: Obsolete
    • 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.

    Description

      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.

      Attachments

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

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: