SamuelBoerlin opened a new issue, #3432:
URL: https://github.com/apache/jena/issues/3432

   ### Version
   
   5.5.0
   
   ### What happened?
   
   Since updating from Fuseki 5.2.0 to Fuseki 5.5.0 I'm observing a pretty 
clear increase in heap memory usage.
   Besides the update to 5.5.0 I also added the following args as suggested by 
some warnings when starting Fuseki without them:
   ```
   --enable-native-access=ALL-UNNAMED --add-modules=jdk.incubator.vector
   ```
   
   The memory usage keeps climbing continuously until the container runs out of 
memory and is restarted, though not due to an OOM exception or the OOM killer, 
but instead presumably due to not responding and failing the container 
healthcheck.
   
   The current heap limit is set as `-Xmx1G`, which was previously sufficient.
   
   This is the memory usage over the last 90 days (Fuseki 5.5.0 was deployed on 
03.09., indicated by the crosshair):
   
   <img width="1525" height="365" alt="Image" 
src="https://github.com/user-attachments/assets/5e513c54-e515-49ff-8550-7fdf36aa4686";
 />
   
   And more granular metrics:
   
   <img width="1525" height="365" alt="Image" 
src="https://github.com/user-attachments/assets/d86e8e47-0458-4246-81fe-8cc6c9f455f7";
 />
   
   The periodic drops in memory usage seem to be the result of a nightly 
compaction.
   
   Sometimes compaction gets permanently stuck (and subsequent compactions too) 
until the next restart, hence the drops are missing some days. Though 
relatively uncommon before, this seems to be occurring now on about a 50/50 
chance so far since upgrading to Fuseki 5.5.0, though it has only been a few 
days. Not sure if this is related, might be another issue entirely as it was 
also happening with Fuseki 5.2.0.
   
   Is Fuseki 5.5.0 known or expected to have increased memory usage?
   
   In any case I'll increase the heap limit from 1GB to 2GB and see if the 
issue persists.
   
   We run Fuseki in a docker container based on eclipse-temurin:21-jre-jammy.
   
   Full command running in container:
   ```
   /opt/java/openjdk/bin/java -Xmx1G -Dlog4j2.formatMsgNoLookups=true 
--enable-native-access=ALL-UNNAMED --add-modules=jdk.incubator.vector 
-Dlog4j.configurationFile=/jena-fuseki/log4j2.properties -cp 
/jena-fuseki/fuseki-server.jar org.apache.jena.fuseki.main.cmds.FusekiServerCmd
   ```
   
   Config file:
   ```
   @prefix :           <http://base/#> .
   @prefix fuseki:     <http://jena.apache.org/fuseki#> .
   @prefix ja:         <http://jena.hpl.hp.com/2005/11/Assembler#> .
   @prefix tdb2:       <http://jena.apache.org/2016/tdb#> .
   @prefix rdf:        <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
   @prefix rdfs:       <http://www.w3.org/2000/01/rdf-schema#> .
   @prefix text:       <http://jena.apache.org/text#> .
   @prefix knora-base: <http://www.knora.org/ontology/knora-base#> .
   
   :service_tdb_all        a                                   fuseki:Service ;
                           rdfs:label                          "TDB2 dsp-repo" ;
                           fuseki:dataset                      :text_dataset ;
                           fuseki:name                         "dsp-repo" ;
                           fuseki:serviceQuery                 "query" , 
"sparql" ;
                           fuseki:serviceReadGraphStore        "get" ;
                           fuseki:serviceReadWriteGraphStore   "data" ;
                           fuseki:serviceUpdate                "update" ;
                           fuseki:serviceUpload                "upload" .
   
   ## ---------------------------------------------------------------
   ## This URI must be fixed - it's used to assemble the text dataset.
   
   :text_dataset           rdf:type                            text:TextDataset 
;
                           text:dataset                        
:tdb_dataset_readwrite ;
                           text:index                          :indexLucene .
   
   # A TDB datset used for RDF storage
   :tdb_dataset_readwrite  a                                   tdb2:DatasetTDB2 
;
                           tdb2:unionDefaultGraph              true ;
                           tdb2:location                       
"/fuseki/databases/dsp-repo" .
   
   # Text index description
   :indexLucene            a                                   
text:TextIndexLucene ;
                           text:directory                      
"/fuseki/lucene/dsp-repo" ;
                           text:entityMap                      :entMap ;
                           text:analyzer                       [ a 
text:ConfigurableAnalyzer ;
                                                                  
text:tokenizer text:WhitespaceTokenizer ;
                                                                  text:filters 
( text:ASCIIFoldingFilter text:LowerCaseFilter)
                                                               ] .
   
   # Mapping in the index
   # URI stored in field "uri"
   # knora-base:valueHasString is mapped to field "text"
   :entMap                 a                                   text:EntityMap ;
                           text:entityField                    "uri" ;
                           text:defaultField                   "text" ;
                           text:uidField                       "uid" ;
                           text:map                            (
                                                                   [ text:field 
 "text" ;  text:predicate  rdfs:label ]
                                                                   [ text:field 
 "text" ;  text:predicate  knora-base:valueHasString ]
                                                                   [ text:field 
 "text" ;  text:predicate  knora-base:valueHasComment ]
                                                               ) .
   ```
   
   ### Relevant output and stacktrace
   
   ```shell
   
   ```
   
   ### Are you interested in making a pull request?
   
   None


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to