From: Steven T. (JIRA) <nh...@gm...> - 2011-04-12 14:28:03
|
SoftLimitMRUCache continues growing despite any attempts to clear ----------------------------------------------------------------- Key: NHCH-37 URL: http://216.121.112.228/browse/NHCH-37 Project: NHibernate.Caches Issue Type: Bug Components: Other Affects Versions: 2.0.0GA Reporter: Steven Thacher Priority: Major We have discovered a small memory leak in our application, and we've been able to track it down to NHibernate using JetBrains dotTrace. It appears that as we make queries, the SessionFactoryImpl class continues to grow. The object within SessionFactoryImpl that seems to be holding on to the most memory is the SoftLimitMRUCache. This issue seems similar to NH-604 which was apparently resolved in 1.0.3, but I continue to see the problem in version 2.0. I've tried various approaches to clearing this cache, but nothing has worked for me thus far. I've tried the following: Attempt 1: Write a clear cache function that clears everything in the session factory: _sessionFactory.EvictQueries(); foreach (Type type in _sessionFactory.GetAllClassMetadata().Keys) _sessionFactory.Evict(type); foreach (string role in _sessionFactory.GetAllCollectionMetadata().Keys) _sessionFactory.EvictCollection(role); Attempt 2: Set the FlushType of our Session, then flush and clear the session before each query. Attempt 3: Change configuration properties in the config XML file and turn off the 2nd level cache. As I said, none of these attempts were successful. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |