AnsweredAssumed Answered

Resource leak when lucene indexes (alt.) contentStore?

Question asked by dirko on Jul 15, 2012
Latest reply on Sep 6, 2012 by dward
Hello,

I've been investigating a problem we experience in a {Alfresco 4, lucene, alternative contentStore} environment and which was not occurring in 3.2. We are using an alternative contentStore (castorContentStore, cfr. http://forge.alfresco.com/gf/project/alfresco2castor/). To understand the issue one must know that the alfresco2castor interface uses a pool of connections to store and retrieve documents. The storing and retrieving of these documents is fine as long as lucene (for the purpose of content indexing) is not retrieving documents . When lucene retrieves a document it is NOT consuming the content of the document stream, resulting in ContentStreamListener.contentStreamClosed() never getting called and the connection never being freed. This was observed by enabling debug logging on the HttpClient and adding logging statements to the implementation of contentStreamClosed. I can configure the castor pool to be a bit larger, resulting in the pool being exhausted (by lucene) just a little bit later.

FYI, the problem is NOT observed in the following environments:
- a {Alfresco 3.1/3.2, lucene, alternative contentStore) environment
- a {Alfresco 4, solr, alternative contentStore) environment
- when content indexing is disabled in a {Alfresco 4, lucene, alternative contentStore} environment

So I would like to check with the alfresco/lucene experts whether the above behaviour rings any bell? I've been looking at the alfresco lucene code and I do see some significant changes, but I would like to poll the community on any insight before i further spend/loose time and dive into the code.

cheers,
dirk

Outcomes