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. create-nodes-test.jar
          4 kB
        2. create-nodes-test.zip
          8 kB
        3. heap-bdb.png
          heap-bdb.png
          82 kB
        4. heap-bdb-query-disabled.png
          heap-bdb-query-disabled.png
          64 kB
        5. histo-bdb.txt
          564 kB
        6. histo-bdb-query-disabled.txt
          691 kB
        7. jboss.txt
          129 kB
        8. jboss-query-disabled.txt
          56 kB
        9. jboss-query-disabled.txt
          381 kB
        10. latest-heap.png
          latest-heap.png
          112 kB
        11. latest-jboss.txt
          204 kB
        12. latest-old-gen.png
          latest-old-gen.png
          86 kB
        13. latest-snapshot.nps
          126 kB
        14. MODE-1793-2013-03-20.zip
          725 kB
        15. NodeCreatorBean.java
          5 kB
        16. old-gen-bdb.png
          old-gen-bdb.png
          74 kB
        17. old-gen-bdb-no-user-transactions.png
          old-gen-bdb-no-user-transactions.png
          64 kB
        18. old-gen-bdb-query-disabled.png
          old-gen-bdb-query-disabled.png
          63 kB
        19. standalone-modeshape.xml
          25 kB
        20. visual_vm.png
          visual_vm.png
          106 kB

        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: