Great on 1481.

The issue with the caching is not about it using up the explicitly cached resources, its about the ThreadLocals keeping a reference to the web-app classloader meaning the entire webapp's Class instances cannot be gc'ed (thus leading to perm gen explosion).

My profiler reported all three instances of ThreadLocal's being kept around.

On Mon, Apr 30, 2012 at 11:23, Michael Kay <mike@saxonica.com> wrote:
The issue with the converter cache will be fixed in the next maintenance release: see

http://dev.saxonica.com/community/issues/1481

I haven't seen evidence that the URI cache causes similar problems. In this case the objects held in the cache are simple strings and booleans so it shouldn't lock down any significant resources. If you do believe it is causing a problem, you can always set the Configuration property FeatureKeys.XSD_VERSION to "1.1", in which case the StandardURIChecker will not be used (in XSD 1.1, all strings are valid for xs:anyURI).

Michael Kay
Saxonica


On 30/04/2012 10:30, Sam (Stephen Samuel) wrote:
Hi,

Saxon 9.4 has a couple of memory leak issues when used in a Tomcat container. The issue is the use of the ThreadLocal's in the following classes.

StandardURIChecker
ConversionRules

Basically the thread locals are created by the webapp classloader, which means that they hold a reference to that classloader, so it cannot be released.

We need someway of clearing these. I couldn't see when a Configuration is created / freed.

--
-Sam



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/


_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help 

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help



--
-Sam