You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Michael Brunnbauer <br...@netestate.de> on 2012/10/13 15:53:55 UTC

Fuseki java.lang.OutOfMemoryError with SPARQL UPDATE

hi all

while trying to load the attached file into a named graph 
(load file://... into <url>) with jena-fuseki-0.2.5-20120916.055428-41,
the following happened. Is there a bug in Fuseki and is my TDB corrupt now ?

02:11:54 INFO  Fuseki               :: [178540] 200 OK
02:11:55 INFO  Fuseki               :: [178541] POST http://ts.foaf-search.net:3030/crawl/update
02:11:55 INFO  Fuseki               :: [178541] 200 OK
02:11:55 INFO  Fuseki               :: [178542] POST http://ts.foaf-search.net:3030/crawl/update
02:11:55 INFO  Fuseki               :: [178542] 200 OK
02:11:57 INFO  Fuseki               :: [178543] POST http://ts.foaf-search.net:3030/crawl/update
02:11:57 INFO  Fuseki               :: [178543] 200 OK
02:11:57 INFO  Fuseki               :: [178544] POST http://ts.foaf-search.net:3030/crawl/update
[GC 551144K->522146K(702720K), 0.0317370 secs]
[GC 572514K->570447K(688448K), 0.0541280 secs]
[GC 600911K->601095K(708224K), 0.0505090 secs]
[GC 631431K->628919K(709248K), 0.0292530 secs]
[GC 654519K->650796K(713856K), 0.0226800 secs]
[Full GC 650796K->562894K(885952K), 1.1422830 secs]
[GC 588366K->593294K(886400K), 0.0171460 secs]
[GC 617742K->614926K(861504K), 0.0208120 secs]
[GC 639310K->637424K(887040K), 0.0212800 secs]
[GC 661744K->659407K(861504K), 0.0233780 secs]
[GC 683663K->681177K(885056K), 0.0299000 secs]
[GC 705369K->702755K(860800K), 0.0312570 secs]
[GC 726883K->724764K(882880K), 0.0420220 secs]
[GC 748828K->746566K(883840K), 0.0459950 secs]
[GC 770630K->768727K(885824K), 0.0408580 secs]
[GC 797527K->796269K(886720K), 0.0474630 secs]
[GC 825069K->822755K(892608K), 0.0405310 secs]
[Full GC 822755K->814611K(903424K), 1.1398340 secs]
[Full GC 841977K->839750K(903424K), 1.1296100 secs]
[Full GC 852799K->821293K(903424K), 1.6644060 secs]
[Full GC 852793K->851693K(903424K), 1.0829110 secs]
[Full GC 852793K->852690K(903424K), 1.0578040 secs]
[Full GC 852793K->852789K(903424K), 1.0567190 secs]
[Full GC 852789K->851022K(903424K), 1.2897860 secs]
[Full GC 852796K->852796K(903424K), 1.0640370 secs]
[Full GC 852796K->852595K(903424K), 1.2039910 secs]
[Full GC 852795K->852795K(903424K), 1.0559390 secs]
[Full GC 852795K->852759K(903424K), 1.0564750 secs]
[Full GC 852795K->852795K(903424K), 1.0518760 secs]
[Full GC 852795K->852792K(903424K), 1.0533050 secs]
02:13:29 WARN  SPARQL_Update$HttpActionUpdate :: Transaction still active in endWriter - no commit or abort seen (forced abort)
[Full GC 852795K->791527K(903424K), 1.1215270 secs]
02:13:30 WARN  Fuseki               :: [178544] RC = 500 : Java heap space
java.lang.OutOfMemoryError: Java heap space
	at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:39)
	at java.nio.ByteBuffer.allocate(ByteBuffer.java:312)
	at com.hp.hpl.jena.tdb.base.block.Block.replicate(Block.java:146)
	at com.hp.hpl.jena.tdb.base.block.Block.replicate(Block.java:129)
	at com.hp.hpl.jena.tdb.transaction.BlockMgrJournal.allocate(BlockMgrJournal.java:121)
	at com.hp.hpl.jena.tdb.transaction.BlockMgrJournal.allocate(BlockMgrJournal.java:118)
	at com.hp.hpl.jena.tdb.base.page.PageBlockMgr.create(PageBlockMgr.java:52)
	at com.hp.hpl.jena.tdb.index.bplustree.BPTreeRecordsMgr.create(BPTreeRecordsMgr.java:79)
	at com.hp.hpl.jena.tdb.index.bplustree.BPTreeRecords.create(BPTreeRecords.java:208)
	at com.hp.hpl.jena.tdb.index.bplustree.BPTreeRecords.split(BPTreeRecords.java:182)
	at com.hp.hpl.jena.tdb.index.bplustree.BPTreeNode.split(BPTreeNode.java:519)
	at com.hp.hpl.jena.tdb.index.bplustree.BPTreeNode.internalInsert(BPTreeNode.java:455)
	at com.hp.hpl.jena.tdb.index.bplustree.BPTreeNode.internalInsert(BPTreeNode.java:468)
	at com.hp.hpl.jena.tdb.index.bplustree.BPTreeNode.internalInsert(BPTreeNode.java:468)
	at com.hp.hpl.jena.tdb.index.bplustree.BPTreeNode.insert(BPTreeNode.java:212)
	at com.hp.hpl.jena.tdb.index.bplustree.BPlusTree.addAndReturnOld(BPlusTree.java:328)
	at com.hp.hpl.jena.tdb.index.bplustree.BPlusTree.add(BPlusTree.java:320)
	at com.hp.hpl.jena.tdb.index.TupleIndexRecord.performAdd(TupleIndexRecord.java:60)
	at com.hp.hpl.jena.tdb.index.TupleIndexBase.add(TupleIndexBase.java:64)
	at com.hp.hpl.jena.tdb.index.TupleTable.add(TupleTable.java:70)
	at com.hp.hpl.jena.tdb.nodetable.NodeTupleTableConcrete.addRow(NodeTupleTableConcrete.java:87)
	at com.hp.hpl.jena.tdb.store.QuadTable.add(QuadTable.java:63)
	at com.hp.hpl.jena.tdb.store.QuadTable.add(QuadTable.java:57)
	at com.hp.hpl.jena.tdb.store.GraphNamedTDB._performAdd(GraphNamedTDB.java:83)
	at com.hp.hpl.jena.tdb.store.GraphTDBBase.performAdd(GraphTDBBase.java:77)
	at com.hp.hpl.jena.graph.impl.SimpleBulkUpdateHandler.add(SimpleBulkUpdateHandler.java:63)
	at com.hp.hpl.jena.graph.impl.SimpleBulkUpdateHandler.addIterator(SimpleBulkUpdateHandler.java:75)
	at com.hp.hpl.jena.graph.impl.SimpleBulkUpdateHandler.add(SimpleBulkUpdateHandler.java:87)
	at com.hp.hpl.jena.graph.impl.SimpleBulkUpdateHandler.add(SimpleBulkUpdateHandler.java:81)
	at com.hp.hpl.jena.sparql.modify.UpdateEngineWorker.visit(UpdateEngineWorker.java:161)
	at com.hp.hpl.jena.sparql.modify.request.UpdateLoad.visit(UpdateLoad.java:59)
	at com.hp.hpl.jena.sparql.modify.UpdateEngineMain.execute(UpdateEngineMain.java:40)
02:13:30 INFO  Fuseki               :: [178544] 500 Java heap space
02:21:31 INFO  Fuseki               :: [178545] POST http://ts.foaf-search.net:3030/foaf/query
02:21:31 INFO  Fuseki               :: [178545] Query = SELECT DISTINCT ?o WHERE { GRAPH ?g { <http://schema.org/Person> <http://www.w3.org/2000/01/rdf-schema#label> ?o }}
02:21:31 INFO  Fuseki               :: [178545] OK/select
02:21:31 INFO  Fuseki               :: [178545] 200 OK

Regards,

Michael Brunnbauer

-- 
++  Michael Brunnbauer
++  netEstate GmbH
++  Geisenhausener Stra�e 11a
++  81379 M�nchen
++  Tel +49 89 32 19 77 80
++  Fax +49 89 32 19 77 89 
++  E-Mail brunni@netestate.de
++  http://www.netestate.de/
++
++  Sitz: M�nchen, HRB Nr.142452 (Handelsregister B M�nchen)
++  USt-IdNr. DE221033342
++  Gesch�ftsf�hrer: Michael Brunnbauer, Franz Brunnbauer
++  Prokurist: Dipl. Kfm. (Univ.) Markus Hendel

Re: Fuseki java.lang.OutOfMemoryError with SPARQL UPDATE

Posted by Michael Brunnbauer <br...@netestate.de>.
Hello Andy,

On Sat, Oct 13, 2012 at 05:59:49PM +0100, Andy Seaborne wrote:
> No (not a bug) and no (the database should be OK - the update did not 
> happen).

That's good to hear!

> How much heap did you give Fuseki?  It looks like you are right on the 
> edge (lots of GC messages)

1200M. I just restarted the updates with 3072M for Fuseki and will tell you if
it happens again.

Regards,

Michael Brunnbauer

-- 
++  Michael Brunnbauer
++  netEstate GmbH
++  Geisenhausener Straße 11a
++  81379 München
++  Tel +49 89 32 19 77 80
++  Fax +49 89 32 19 77 89 
++  E-Mail brunni@netestate.de
++  http://www.netestate.de/
++
++  Sitz: München, HRB Nr.142452 (Handelsregister B München)
++  USt-IdNr. DE221033342
++  Geschäftsführer: Michael Brunnbauer, Franz Brunnbauer
++  Prokurist: Dipl. Kfm. (Univ.) Markus Hendel

Re: Fuseki java.lang.OutOfMemoryError with SPARQL UPDATE

Posted by Andy Seaborne <an...@apache.org>.
On 13/10/12 14:53, Michael Brunnbauer wrote:
>
> hi all
>
> while trying to load the attached file into a named graph
> (load file://... into <url>) with jena-fuseki-0.2.5-20120916.055428-41,
> the following happened. Is there a bug in Fuseki and is my TDB corrupt now ?

No (not a bug) and no (the database should be OK - the update did not 
happen).

It's not a bug per se - it's the transaction batch update keeping hold 
of memory + other memory-limiting issues about request checking.  This 
needs some tuning some time - both size sensitive batching and better a 
spill-to-disk datastructure for the committed-queued indexes.  Just a 
small matter of time and programming.

How much heap did you give Fuseki?  It looks like you are right on the 
edge (lots of GC messages)

A hack would be to intersperse some small (even zero change) updates 
like POSTing INSERT DATA {}

The batch size is currently 10 commits.

	Andy

>
> 02:11:54 INFO  Fuseki               :: [178540] 200 OK
> 02:11:55 INFO  Fuseki               :: [178541] POST http://ts.foaf-search.net:3030/crawl/update
> 02:11:55 INFO  Fuseki               :: [178541] 200 OK
> 02:11:55 INFO  Fuseki               :: [178542] POST http://ts.foaf-search.net:3030/crawl/update
> 02:11:55 INFO  Fuseki               :: [178542] 200 OK
> 02:11:57 INFO  Fuseki               :: [178543] POST http://ts.foaf-search.net:3030/crawl/update
> 02:11:57 INFO  Fuseki               :: [178543] 200 OK
> 02:11:57 INFO  Fuseki               :: [178544] POST http://ts.foaf-search.net:3030/crawl/update
> [GC 551144K->522146K(702720K), 0.0317370 secs]
> [GC 572514K->570447K(688448K), 0.0541280 secs]
> [GC 600911K->601095K(708224K), 0.0505090 secs]
> [GC 631431K->628919K(709248K), 0.0292530 secs]
> [GC 654519K->650796K(713856K), 0.0226800 secs]
> [Full GC 650796K->562894K(885952K), 1.1422830 secs]
> [GC 588366K->593294K(886400K), 0.0171460 secs]
> [GC 617742K->614926K(861504K), 0.0208120 secs]
> [GC 639310K->637424K(887040K), 0.0212800 secs]
> [GC 661744K->659407K(861504K), 0.0233780 secs]
> [GC 683663K->681177K(885056K), 0.0299000 secs]
> [GC 705369K->702755K(860800K), 0.0312570 secs]
> [GC 726883K->724764K(882880K), 0.0420220 secs]
> [GC 748828K->746566K(883840K), 0.0459950 secs]
> [GC 770630K->768727K(885824K), 0.0408580 secs]
> [GC 797527K->796269K(886720K), 0.0474630 secs]
> [GC 825069K->822755K(892608K), 0.0405310 secs]
> [Full GC 822755K->814611K(903424K), 1.1398340 secs]
> [Full GC 841977K->839750K(903424K), 1.1296100 secs]
> [Full GC 852799K->821293K(903424K), 1.6644060 secs]
> [Full GC 852793K->851693K(903424K), 1.0829110 secs]
> [Full GC 852793K->852690K(903424K), 1.0578040 secs]
> [Full GC 852793K->852789K(903424K), 1.0567190 secs]
> [Full GC 852789K->851022K(903424K), 1.2897860 secs]
> [Full GC 852796K->852796K(903424K), 1.0640370 secs]
> [Full GC 852796K->852595K(903424K), 1.2039910 secs]
> [Full GC 852795K->852795K(903424K), 1.0559390 secs]
> [Full GC 852795K->852759K(903424K), 1.0564750 secs]
> [Full GC 852795K->852795K(903424K), 1.0518760 secs]
> [Full GC 852795K->852792K(903424K), 1.0533050 secs]
> 02:13:29 WARN  SPARQL_Update$HttpActionUpdate :: Transaction still active in endWriter - no commit or abort seen (forced abort)
> [Full GC 852795K->791527K(903424K), 1.1215270 secs]
> 02:13:30 WARN  Fuseki               :: [178544] RC = 500 : Java heap space
> java.lang.OutOfMemoryError: Java heap space
> 	at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:39)
> 	at java.nio.ByteBuffer.allocate(ByteBuffer.java:312)
> 	at com.hp.hpl.jena.tdb.base.block.Block.replicate(Block.java:146)
> 	at com.hp.hpl.jena.tdb.base.block.Block.replicate(Block.java:129)
> 	at com.hp.hpl.jena.tdb.transaction.BlockMgrJournal.allocate(BlockMgrJournal.java:121)
> 	at com.hp.hpl.jena.tdb.transaction.BlockMgrJournal.allocate(BlockMgrJournal.java:118)
> 	at com.hp.hpl.jena.tdb.base.page.PageBlockMgr.create(PageBlockMgr.java:52)
> 	at com.hp.hpl.jena.tdb.index.bplustree.BPTreeRecordsMgr.create(BPTreeRecordsMgr.java:79)
> 	at com.hp.hpl.jena.tdb.index.bplustree.BPTreeRecords.create(BPTreeRecords.java:208)
> 	at com.hp.hpl.jena.tdb.index.bplustree.BPTreeRecords.split(BPTreeRecords.java:182)
> 	at com.hp.hpl.jena.tdb.index.bplustree.BPTreeNode.split(BPTreeNode.java:519)
> 	at com.hp.hpl.jena.tdb.index.bplustree.BPTreeNode.internalInsert(BPTreeNode.java:455)
> 	at com.hp.hpl.jena.tdb.index.bplustree.BPTreeNode.internalInsert(BPTreeNode.java:468)
> 	at com.hp.hpl.jena.tdb.index.bplustree.BPTreeNode.internalInsert(BPTreeNode.java:468)
> 	at com.hp.hpl.jena.tdb.index.bplustree.BPTreeNode.insert(BPTreeNode.java:212)
> 	at com.hp.hpl.jena.tdb.index.bplustree.BPlusTree.addAndReturnOld(BPlusTree.java:328)
> 	at com.hp.hpl.jena.tdb.index.bplustree.BPlusTree.add(BPlusTree.java:320)
> 	at com.hp.hpl.jena.tdb.index.TupleIndexRecord.performAdd(TupleIndexRecord.java:60)
> 	at com.hp.hpl.jena.tdb.index.TupleIndexBase.add(TupleIndexBase.java:64)
> 	at com.hp.hpl.jena.tdb.index.TupleTable.add(TupleTable.java:70)
> 	at com.hp.hpl.jena.tdb.nodetable.NodeTupleTableConcrete.addRow(NodeTupleTableConcrete.java:87)
> 	at com.hp.hpl.jena.tdb.store.QuadTable.add(QuadTable.java:63)
> 	at com.hp.hpl.jena.tdb.store.QuadTable.add(QuadTable.java:57)
> 	at com.hp.hpl.jena.tdb.store.GraphNamedTDB._performAdd(GraphNamedTDB.java:83)
> 	at com.hp.hpl.jena.tdb.store.GraphTDBBase.performAdd(GraphTDBBase.java:77)
> 	at com.hp.hpl.jena.graph.impl.SimpleBulkUpdateHandler.add(SimpleBulkUpdateHandler.java:63)
> 	at com.hp.hpl.jena.graph.impl.SimpleBulkUpdateHandler.addIterator(SimpleBulkUpdateHandler.java:75)
> 	at com.hp.hpl.jena.graph.impl.SimpleBulkUpdateHandler.add(SimpleBulkUpdateHandler.java:87)
> 	at com.hp.hpl.jena.graph.impl.SimpleBulkUpdateHandler.add(SimpleBulkUpdateHandler.java:81)
> 	at com.hp.hpl.jena.sparql.modify.UpdateEngineWorker.visit(UpdateEngineWorker.java:161)
> 	at com.hp.hpl.jena.sparql.modify.request.UpdateLoad.visit(UpdateLoad.java:59)
> 	at com.hp.hpl.jena.sparql.modify.UpdateEngineMain.execute(UpdateEngineMain.java:40)
> 02:13:30 INFO  Fuseki               :: [178544] 500 Java heap space
> 02:21:31 INFO  Fuseki               :: [178545] POST http://ts.foaf-search.net:3030/foaf/query
> 02:21:31 INFO  Fuseki               :: [178545] Query = SELECT DISTINCT ?o WHERE { GRAPH ?g { <http://schema.org/Person> <http://www.w3.org/2000/01/rdf-schema#label> ?o }}
> 02:21:31 INFO  Fuseki               :: [178545] OK/select
> 02:21:31 INFO  Fuseki               :: [178545] 200 OK
>
> Regards,
>
> Michael Brunnbauer
>