On 03/02/2012 11:46, Michael Kay wrote:
Thanks for the detail. It appears that you're not accumulating documents in memory, which is the problem I assumed you had, but rather instances of a ThreadLocal cache. That's a new problem I haven't seen before.

I'm going to change the ThreadLocal Converter cache to use an LRUCache so it never grows beyond a certain size.

I'm not sure this will prevent the Tomcat messages, which appear to be complaining about the existence of the ThreadLocal rather than about the fact that it's growing. But it should prevent the memory "leak" (which I would have expected to be a very slow one anyway.)

As to numbers, there are two of these caches in a ConversionRules object, and there will probably in most cases be one ConversionRules object per Configuration, which equates to a s9api Processor. So this explains why the messages come in pairs.

Michael Kay
Saxonica