I applied Andy's hints:
- TransactionManager.DEBUG = true
- TransactionManager.QueueBatchSize = 5

Before each Transaction, it prints the size of the List of Transaction's of
in commitedAwaitingFlush. I also printed  the size of file TDB/journal.jrnl
. So I see both sizes grow until reaching QueueBatchSize and then both
sizes returns to 0 .

What happened in my case was that the transactions were rather big, several
Mb. And the memory set for the application was rather small, 200Mb.
So, with the default of QueueBatchSize = 10, depending on the inputs ( in
the case causing OOM exception inputs are dbPedia URL's ), the available
memory was sooner or later  exceeded. This was certainly made worse by
having one or two instances of the union graph around.

I did not set QueueBatchSize to 0 for now, because this list of commits
Awaiting Flush optimizes disk usage, but maybe I should set it to the
maximum number of transactions during an HTTP request. Note that I have
also transactions as small as a single triple (corresponding to user
input).

The instrumented TransactionManager.java is here:
https://github.com/jmvanel/semantic_forms/blob/master/scala/forms_play/app/controllers/TransactionManager.java

Thanks all for you help !


2016-02-04 12:50 GMT+01:00 Rob Vesse <[email protected]>:

>
> On 04/02/2016 10:41, "Jean-Marc Vanel" <[email protected]> wrote:
>
> >The journal workspace you mention is on disk , isn't it ? My problem is
> >not
> >on disk at all.
>
> No
>
> The journal is both in-memory and on-disk as it is a Write ahead log for
> failure recovery purposes, the disk portion preserves the data for failure
> recovery while the in-memory portion provides data to the live instance.
>
> If there is a non-empty journal on disk then there is a corresponding
> amount of memory within the JVM heap used to store the latest state of the
> data for subsequent transactions while not overwriting the old state of
> the data which ongoing transactions may still be accessing
>
> Rob
>
>
>
>
>


-- 
Jean-Marc Vanel
Déductions SARL - Consulting, services, training,
Rule-based programming, Semantic Web
http://deductions-software.com/
+33 (0)6 89 16 29 52
Twitter: @jmvanel , @jmvanel_fr ; chat: irc://irc.freenode.net#eulergui

Reply via email to