We are using NHibernate in different products since years and without any
problem.
Recently, we are facing a memory leak issue in some new sites.
Investigating with a profiler, we have found that the problem is NHibernate
sessions that are not garbage collected.
This is really strange as all our interactions with NHibernate are
following this pattern:
using(ISession session = nhibernateHelper.OpenSession())
{
// Read or write data...
}
The helper is just a singleton that has a private session factory
initialized at startup.
It must be somehow related to the environment, because exactly the same
binaries with exactly the same database are leaking on a machine but not on
another one.
We have tried with different versions of .NET (4.5.2 and 4.6.1), no change
We have tried with software in debug or release. It leaks faster on debug,
but it leaks in both configurations.
Our database is postgres 9.4
We are running on a Windows 2012 R2 server.
The software is running as a Windows service, it has <gcServer
enabled="true" /> in its app.config.
What could be the cause for such memory leak ?
Has anybody also experienced such problems ?
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.