Hello Jena users,
perhaps you'll find the following information useful, perhaps not :)
Problem:
A few days ago I asked for ideas why TDB has open file handles even if
one closed the model. This is a crucial point in case you are using
plenty of graphs. A call to graph.getDataSet().close() helped to close
most of the handles, but some unused file handles still remain. In long
running instances (doing re-open graphs often) this can be a problem.
Cause:
Today I dived into Jena's source code and found in BlockMgrMapped that
the database files are accessed via memory mapped buffers. As Java seems
to lack in a possibility to unmap the buffer directly, file handles
remain open.
Solution:
The only possibility I found (without changing anything in the Jena
framework) was to explicitly call System.gc() after dataSet.close().
Usually this closes the file handles (because Jena nulled all the
buffers before [bless the Jena group for this :) ]).
Of course, System.gc() is only an advice to the VM, but it seems to be
successful.
Thanks
André
--
Dr. André Lanka * 0178 / 134 44 47 * http://dr-lanka.de