This issue has surfaced while working on Kaplan Catalyst. The queries rely on a DependencyResolver (ChildAssociationDependencyResolver) to find child nodes by following parent-child associations recursively. It is relatively time consuming for large node trees. The default size of a Mule thread pool is 16. When the query is long running, it will take a while before the query XML file is moved to the processed folder. For some reason, it causes multiple threads in the QueryFolderPoller service to start handling the same query XML file. As a result, OutOfMemoryExceptions are commonly encountered. One of the solutions is to allow only one thread in the pool:
<core:configuration>
<default-threading-profile maxThreadsActive="1" />
</core:configuration>
|