Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-689

Fuseki/TDB memory leak for concurrent updates/queries

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Abandoned
    • Fuseki 1.0.1, TDB 1.0.1
    • None
    • Fuseki, TDB
    • None
    • OSX 10.9.2, 2.8 GHz, 16G RAM, SSD
      and CentOS release 6.4, x86_64, 64G RAM, SSD

    Description

      When running concurrent POST updates and queries against a Fuseki/TDB server, the server appears to bleed memory until it eventually runs out and dies with:

      java.lang.OutOfMemoryError: GC overhead limit exceeded

      Using the included TDB config file, sample data file, and Groovy script, the Fuseki/TDB server can consistently be knocked down. The script runs four concurrent threads: one that repeatedly POSTs data (in separate contexts/graphs) and three that query the server for triple counts.

      To execute the script, do the following:

      1. Install Groovy
      2. Download and install jena-fuseki-1.0.1
      3. Download the attached file FusekiTest.tar.gz and untar it in the jena-fuseki directory
      4. Edit the fuseki-server script, set the max heap size to 2G (--Xmx2G)
      5. Start the server with: ./fuseki-server --config=config-test.ttl
      6. In a separate window/shell, execute: groovy query.groovy
      7. Wait a few minutes for the OOE to occur. The script will output some stats.

      A typical run of the script will result in:

      Added context #1
      Added context #2
      Added context #3
      Added context #4
      Added context #5
      Added context #6
      Added context #7
      Added context #8
      Added context #9
      Query thread dying
      Total contexts added: 9
      Total triples added: 4500000
      Total successful queries: 155

      While this simple test fails consistently on OSX and running with a 2G heap Fuseki/TDB server, we've also observed it running on CentOS with a 16GB heap max and monitoring with NewRelic. It took a lot longer, but the end result was the same: all the heaps (regular, eden, survivor, and old gen) eventually converge on their maximums and the JVM fails.

      It's interesting to note that if all the contexts/graphs are added FIRST (with no concurrent queries), everything works just fine.

      Attachments

        1. FusekiTest.tar.gz
          9.47 MB
          Ola Bildtsen
        2. Original Test.png
          86 kB
          Rob Vesse
        3. No Union Graph Test.png
          69 kB
          Rob Vesse
        4. config-no-union.ttl
          1 kB
          Rob Vesse
        5. query-no-union.groovy
          2 kB
          Rob Vesse
        6. out2.txt
          9 kB
          Ola Bildtsen
        7. out.txt
          9 kB
          Ola Bildtsen
        8. query.groovy
          3 kB
          Ola Bildtsen

        Activity

          People

            Unassigned Unassigned
            swedemn Ola Bildtsen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: