Hi,
Our connection pool is running out of connections in an application
that uses the Oracle10gDialect running on the ODP.Net 11g client using
2.1.2GA release of NHibernate
We can recreate the scenario by running the below code in a test in
either resharper test runner or nunit gui:
for (int j = 0; j < 200; j++)
{
using (var scope = new TransactionScope
(TransactionScopeOption.Required))
{
using (ISession session =
factoryProvider.SessionFactory.OpenSession())
{
session.Save(new SomePersistenEntity());
}
scope.Complete();
}
}
will result in the Perfmon NumberOfStasisConnections counter
increasing until it reaches the connection pool max size and then we
receive a connection request timeout exceptions (i.e. no more
connections in the pool).
NumberOfStasisConnections does not increase if you remove the
TransactionScope. It also does not increase if you run the following
test:
for (int j = 0; j < 200; j++)
{
using (var scope = new TransactionScope
(TransactionScopeOption.Required))
{
using (var connection = new OracleConnection(connectionString)
{
connection.Open();
var command = new OracleCommand(insertSql, connection);
command.CommandType = CommandType.Text;
command.ExecuteNonQuery();
}
scope.Complete();
}
}
Thanks,
Peter
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.