Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Managed odp.net driver 4.121.1.1 memory and handles increase on connection exception bug

user2160481Oct 17 2013 — edited Nov 1 2013

Hello,

I'm checking the behaivour of the managed odp.net versus no managed odp.net version and I've found a memory and handles increase on the managed version. For checking I've uses two scenarios in a retry connection loop:

1. Error user/password.

2. Unplup computer from Network / switch off Wifi.

In both scenarios using procexp64.exe on "Performance" tab to check memory and handles.

Results:

With the no managed driver memory and handles works as spected.

With the managed driver memory and handles increase in each iteration.

The code I use for testing is the following:

class Program
{
static void Main(string[] args)
{

for (int i = 0; i < 10000; i++)
{
DatabaseConnection @base = new DatabaseConnection("Oracle.DataAccess.Client", "User Id=mlxnouser; Password=nopassword; Data Source=GIJITSW04/orclmlx");

try
{
@base.Open();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
finally
{
@base.Close();
}

Thread.Sleep(500);

}

Console.WriteLine("Press key to exit.");

Console.ReadKey();

}

private class DatabaseConnection
{
protected DbConnection dataBaseConnection;
protected DbProviderFactory dataBaseProvider;

public DatabaseConnection(string databaseProviderAssembly, string connectionString)
{
dataBaseProvider = DbProviderFactories.GetFactory(databaseProviderAssembly);

dataBaseConnection = dataBaseProvider.CreateConnection();

dataBaseConnection.ConnectionString = connectionString;
}

public void Open()
{
dataBaseConnection.Open();
}

public void Close()
{
dataBaseConnection.Close();
}

}

In my computer is installed the no managed driver. For testing managed driver i downloaded from nuget and i change my App.config with the following code:

  <system.data>

    <DbProviderFactories>

      <remove invariant="Oracle.DataAccess.Client" />

      <add name="Oracle.DataAccess.Client" invariant="Oracle.DataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.121.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />

    </DbProviderFactories>

  </system.data>

I hope that can be helpfull.

Best Regards

Jose Luis Vazquez

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 29 2013
Added on Oct 17 2013
5 comments
1,422 views