vivo-project / VIVO

VIVO is an extensible semantic web application for research discovery and showcasing scholarly work
http://vivoweb.org
BSD 3-Clause "New" or "Revised" License
206 stars 129 forks source link

Java HEAP out of memory #3730

Closed jcabrerazuniga closed 2 years ago

jcabrerazuniga commented 2 years ago

While running

./add-rdf-to-vivo.sh

I got the next java heap space exception:

2022-07-19 23:14:25.560 INFO [o.v.h.t.Transfer] Transfer: Records loaded: 5943

2022-07-19 23:44:42.285 INFO [o.v.h.t.Transfer] Transfer: End

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

      at java.util.HashMap.newNode(HashMap.java:1742)

      at java.util.HashMap.putVal(HashMap.java:641)

      at java.util.HashMap.put(HashMap.java:611)

      at java.util.HashSet.add(HashSet.java:219)

      at org.apache.jena.rdfxml.xmloutput.impl.Relation.innerAdd(Relation.java:116)

      at org.apache.jena.rdfxml.xmloutput.impl.Relation.set(Relation.java:52)

      at org.apache.jena.rdfxml.xmloutput.impl.Relation.transitiveClosure(Relation.java:158)

      at org.apache.jena.rdfxml.xmloutput.impl.Unparser.findInfiniteCycles(Unparser.java:1538)

      at org.apache.jena.rdfxml.xmloutput.impl.Unparser.access$800(Unparser.java:140)

      at org.apache.jena.rdfxml.xmloutput.impl.Unparser$8.hasNext(Unparser.java:1651)

      at org.apache.jena.util.iterator.NiceIterator$1.hasNext(NiceIterator.java:105)

      at org.apache.jena.util.iterator.WrappedIterator.hasNext(WrappedIterator.java:90)

      at org.apache.jena.util.iterator.FilterIterator.hasNext(FilterIterator.java:55)

      at org.apache.jena.rdfxml.xmloutput.impl.Unparser.wObjStar(Unparser.java:359)

      at org.apache.jena.rdfxml.xmloutput.impl.Unparser.wRDF(Unparser.java:345)

      at org.apache.jena.rdfxml.xmloutput.impl.Unparser.write(Unparser.java:247)

      at org.apache.jena.rdfxml.xmloutput.impl.Abbreviated.writeBody(Abbreviated.java:127)

      at org.apache.jena.rdfxml.xmloutput.impl.BaseXMLWriter.writeXMLBody(BaseXMLWriter.java:502)

      at org.apache.jena.rdfxml.xmloutput.impl.BaseXMLWriter.write(BaseXMLWriter.java:473)

      at org.apache.jena.riot.adapters.AdapterRDFWriter.write(AdapterRDFWriter.java:56)

      at org.apache.jena.riot.adapters.RDFWriterRIOT.write(RDFWriterRIOT.java:83)

      at org.vivoweb.harvester.util.repo.JenaConnect.exportRdfToStream(JenaConnect.java:279)

      at org.vivoweb.harvester.util.repo.JenaConnect.exportRdfToStream(JenaConnect.java:260)

      at org.vivoweb.harvester.util.repo.JenaConnect.exportRdfToFile(JenaConnect.java:348)

      at org.vivoweb.harvester.util.repo.JenaConnect.exportRdfToFile(JenaConnect.java:325)

      at org.vivoweb.harvester.util.repo.JenaConnect.exportRdfToFile(JenaConnect.java:313)

      at org.vivoweb.harvester.transfer.Transfer.execute(Transfer.java:170)

      at org.vivoweb.harvester.transfer.Transfer.main(Transfer.java:214)

incomingFilename: /usr/local/vivo/unm-pubmed/data/vivo-additions.rdf.xml, profilesFilename: /usr/local/vivo/people/person.txt, outputFilename: /usr/local/vivo/unm-pubmed/inject/inject-07-19-2022_23:44:42.xml

How to solve this problem? Thanks

jcabrerazuniga commented 2 years ago

Solved modifying heap values at the vivo/harvester/bin scripts