On 27/07/2021 14:40, Laura Morales wrote:
I can actually confirm that this was happening to me as well on a VM with 4GB 
RAM and TDB store (thus not in-memory). As more and more queries were made, RAM 
filled up, then the SWAP filled up, and at that point I had to reboot the 
machine. My solution was just to restart the server with a cronjob.

It sounds like the heap is too big.

Heap should never be such that swap happens (a general java point, not related to Jena).

If the heap goes to swap, then a major GC is appalling.

You can setup a small footprint TDB if necessary.
https://jena.apache.org/documentation/tdb/store-parameters.html

How useful that is depends on the amount of data.

    Andy



Sent: Tuesday, July 27, 2021 at 3:19 PM
From: "Marco Fiocco" <[email protected]>
To: [email protected]
Subject: In-memory Fuseki keeps growing memory indefinitely even if idle

Hello,

I'm running a in-memory Fuseki 3.16 server and I see that the allocated memory 
keeps growing linearly indefinitely even if idle.
Initially I reserved 1GB of memory and I've noticed that the process gets OOM 
killed every 2 hours. Now I've allocated 2GB because I've read somewhere that 
2GB is the minimum for Java heaps. Is that true?
I'm waiting to see if it will get again.
Is this a bug or there is a better way to config it?

My Fuseki config is:

@prefix fuseki:  <http://jena.apache.org/fuseki#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tdb:     <http://jena.hpl.hp.com/2008/tdb#> .
@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
@prefix :        <#> .

[] rdf:type fuseki:Server .

<#service> rdf:type fuseki:Service ;
     rdfs:label          "Dataset with SHACL validation" ;
     fuseki:name         "ds" ;                                                 
                                                              # See the endpoint url in 
build.gradle
     fuseki:serviceReadWriteGraphStore "data" ;                                 
                                                      # SPARQL Graph store protocol (read 
and write)
     fuseki:endpoint    [ fuseki:operation fuseki:query ;       fuseki:name 
"sparql"  ] ;     # SPARQL query service
     fuseki:endpoint    [ fuseki:operation fuseki:shacl ;       fuseki:name 
"shacl" ] ;               # SHACL query service
     fuseki:dataset      <#dataset> .

## In memory TDB with union graph.
<#dataset> rdf:type   tdb:DatasetTDB ;
   tdb:location "--mem--" ;
   # Query timeout on this dataset (1s, 1000 milliseconds)
   ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "1000" ] ;
   # Make the default graph be the union of all named graphs.
   tdb:unionDefaultGraph true .

Thanks
Marco

Reply via email to