Comments (6)
I found some info on page 23 of this:
http://people.apache.org/~markt/presentations/2010-11-04-Memory-Leaks-60mins.pdf
It looks like the web application should call remove() on the thread local at the end of a request - but this cannot be done with the current OWL API code. Whether it would be convenient to do so, I think not, because the cache would then be renewed after each request - if parsing of the same or similar ontologies is done in separate requests, this would reduce the cache hits and complicate the architecture.
I think the best short term solution to this is to revert to your synchronized map solution; this is not ideal, as the synchronized weak cache is potentially a bottleneck for all threads parsing ontologies at the same time, but I cannot figure out a better one, at the moment.
from owlapi.
I have reverted this and deployed a new snapshot on Sonatype. If you reckon this is urgent, I could make a new release in a week or so.
from owlapi.
I don't know if it is urgent as I am not sure how often threads would be
reused by the ServletContainer in practice and how often people will be
reloading webapps without restarting the servlet container, if that was
part of the cause.
In production I rarely reload webapps without restarting the servlet
container, as there is typically a scheduled downtime so you can have the
luxury of a cold reboot. In testing however I can't be restarting Tomcat
each time so I tend to just rely on Tomcat redeploying the servlet and that
is where the warnings came up.
According to that presentation, Tomcat has a few different viable
strategies for some of the bugs and it mentioned configurable behaviour for
ThreadLocal clearing but didn't mention how to do that there.
You could try reusing this Public Domain ConcurrentWeakHashMap solution by
Doug Lea and Jason Greene that has adjustable concurrency:
It appears to support concurrent retrievals based on its Javadoc, which
would be the main application of it in WeakCache, as puts should be very
rare in practice after a small warmup phase.
On 20 May 2013 17:43, ignazio1977 [email protected] wrote:
I have reverted this and deployed a new snapshot on Sonatype. If you
reckon this is urgent, I could make a new release in a week or so.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/6#issuecomment-18135684
.
from owlapi.
It seems that ConcurrentWeakHashMap was later redesigned to be ConcurrentReferenceHashMap (again Public Domain by the same authors) which supports different types of References for different purposes.
from owlapi.
Something along those lines is a good plan - long term, we want to replace
these in house utilities with something better Apache or guava. This last
one has configurable collections to achieve the same purpose.
On 20 May 2013 12:33, "Peter Ansell" [email protected] wrote:
It seems that ConcurrentWeakHashMap was later redesigned to be
ConcurrentReferenceHashMap (again Public Domain by the same authors) which
supports different types of References for different purposes.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/6#issuecomment-18143026
.
from owlapi.
Threads are going to be renewed over time to try and avoid a probable memory leak
from owlapi.
Related Issues (20)
- build errors in owlapi-osgidistribution related to version ranges HOT 1
- DLSafeRule serialisation is non-deterministic
- Consider raising Java version requirement to 17 or 21 to allow for algebraic data types HOT 5
- Complex DL Query HOT 1
- EntitySearcher.getAnnotations(class) for all ontologies in import closure HOT 1
- superAnnotationProperties? HOT 2
- How to force OWL-API to use shortened IRIs in RDF/XML? HOT 1
- `uk.ac.manchester.cs.owl.owlapi.Internals` should become again interface-based like it used to be in Version 3 HOT 2
- Shared class expression in axiom with annotations causes extra triples in output HOT 1
- [question] what are possible use-cases of `ConcurrentOWLOntologyImpl` ? HOT 3
- ManchesterParser passes quotes to ShortFormProvider HOT 3
- [OBO parser] Axiom annotations using arbitrary properties are not always properly translated HOT 3
- [question] How to import SKOS Core Vocabulary without getting 429 response code HOT 3
- `OWLOntologyDocumentTarget`: documentation
- Triple parsing errors triggered by annotations on XSD datatypes HOT 2
- Vulnerabilities in Guava HOT 1
- Extending OWLOntologyLoaderListener
- Silencing import errors does not seem to work for OBO files HOT 6
- Disable resolving of imports entirely (offline mode)
- Remove org.openrdf.rio.RDFParserFactory
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from owlapi.