Re: Forward/backward rules (and reasoner memory leaks)

2016-06-24 Thread Dave Reynolds
That's not a cache but a table. Don't think it's guaranteed safe to delete from it, but may be misremembering - it was a long time ago! Dave On 24/06/16 13:43, Stian Soiland-Reyes wrote: I rebased and solved the FIXMEs. The memory leaks are still there in a way, but the guava cache would flush

Re: Forward/backward rules (and reasoner memory leaks)

2016-06-24 Thread Stian Soiland-Reyes
I rebased and solved the FIXMEs. The memory leaks are still there in a way, but the guava cache would flush them out once it reaches the configured maximum (I set the default to 512k goals, but the memory usage per goal could vary a lot depending on the rules) On 21 June 2016 at 09:59, Andy Seabor

Re: Forward/backward rules (and reasoner memory leaks)

2016-06-23 Thread Dave Reynolds
Hi Martynas, If it really is a different schema and and data each time then you can't cache. If you only have a small number of schemas then you could use bindSchema to generate a set of partially-evaluated reasoners, cache those, and pick the right one to use for a given set of message head

Re: Forward/backward rules (and reasoner memory leaks)

2016-06-23 Thread Martynas Jusevičius
Maybe I should evaluate, if I need an InfModel there in the first place... On Thu, Jun 23, 2016 at 10:38 PM, Martynas Jusevičius wrote: > Hey again, > > I have profiled the CPU time, and it seems that a lot of it (93.5% > after some 22500 HTTP requests) is spent in the following methods: > > com.

Re: Forward/backward rules (and reasoner memory leaks)

2016-06-23 Thread Martynas Jusevičius
Hey again, I have profiled the CPU time, and it seems that a lot of it (93.5% after some 22500 HTTP requests) is spent in the following methods: com.hp.hpl.jena.rdf.model.ModelFactory.createInfModel (com.hp.hpl.jena.reasoner.Reasoner, com.hp.hpl.jena.rdf.model.Model, com.hp.hpl.jena.rdf.model.Mod

Re: Forward/backward rules (and reasoner memory leaks)

2016-06-22 Thread Andy Seaborne
On 21/06/16 21:20, Martynas Jusevičius wrote: What about https://issues.apache.org/jira/browse/JENA-650? It was a GSoC project and provides some useful prototyping - that was the project goal and it was successful. It isn't in a state to integrate in to the release - how about trying it out

Re: Forward/backward rules (and reasoner memory leaks)

2016-06-21 Thread Martynas Jusevičius
What about https://issues.apache.org/jira/browse/JENA-650? On Tue, Jun 21, 2016 at 10:59 AM, Andy Seaborne wrote: > We have outstanding: > > https://github.com/apache/jena/pull/47 > > which changes the cache to LRU from fixed. > That does not fix any memory leaks but might mitigate them. > > Ther

Re: Forward/backward rules (and reasoner memory leaks)

2016-06-21 Thread Andy Seaborne
We have outstanding: https://github.com/apache/jena/pull/47 which changes the cache to LRU from fixed. That does not fix any memory leaks but might mitigate them. There are two FIXME in the PR which could do with looking at. Andy On 21/06/16 09:28, Dave Reynolds wrote: Hi Martynas, On 2

Re: Forward/backward rules (and reasoner memory leaks)

2016-06-21 Thread Dave Reynolds
Hi Martynas, On 20/06/16 22:18, Martynas Jusevičius wrote: Hey, after using GenericRuleReasoner and InfModel more extensively, we started experiencing memory leaks that eventually kill our webapp because it runs out of heap space. Jena version is 2.11.0. After some profiling, it seems that RET

Re: Forward/backward rules (and reasoner memory leaks)

2016-06-20 Thread Martynas Jusevičius
What is the status of JENA-650 by the way? https://issues.apache.org/jira/browse/JENA-650 On Mon, Jun 20, 2016 at 11:18 PM, Martynas Jusevičius wrote: > Hey, > > after using GenericRuleReasoner and InfModel more extensively, we > started experiencing memory leaks that eventually kill our webapp >

Re: Forward/backward rules (and reasoner memory leaks)

2016-06-20 Thread Martynas Jusevičius
What is the status of JENA-650 by the way? https://issues.apache.org/jira/browse/JENA-650 On Mon, Jun 20, 2016 at 11:18 PM, Martynas Jusevičius wrote: > Hey, > > after using GenericRuleReasoner and InfModel more extensively, we > started experiencing memory leaks that eventually kill our webapp >

Forward/backward rules (and reasoner memory leaks)

2016-06-20 Thread Martynas Jusevičius
Hey, after using GenericRuleReasoner and InfModel more extensively, we started experiencing memory leaks that eventually kill our webapp because it runs out of heap space. Jena version is 2.11.0. After some profiling, it seems that RETEEngine.clauseIndex and/or RETEEngine.infGraph are retaining a