Memory leak using child container?

Nov 25, 2008 at 10:06 PM
I recently rebuilt an application on Unity 1.2 and NHibernate. The app pulls a batch of jobs from a queue and dispatches them to a thread pool. I was creating a child container for each job and disposing of it at the end of each job. In the child container, I registered an entity loaded by NHibernate. The app kept eating memory, slowing down and then dying with a System.OutOfMemoryException while resolving a dependency. Also, Unity wraps objects with PIAB 3.1, we use an NHibernateInterceptor to build entities with Unity.

I eventually was able to narrow it down to creating a child container for each job. I created a test app to isolate the behaviour, but I was not able to recreate it after an hour or so. Because there are so many factors in the production environment, I thought I would throw this out to the community to see if anyone has had a similar experience

Nov 26, 2008 at 7:48 AM
Hi, see this related posts:

Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.