Memory leak when connecting to oracle 19 client
Posted: Thu 07 Jan 2021 14:20
Hi.
I am experiencing a significant memory leak when connecting to an Oracle 19 database using the Oracle 19.0.0.0.0 client.
The following code will replicate the issue and quickly consumes large amounts of memory. I have also tested this using an older Oracle 11.2.0.3.0 client with the same Oracle 19 database and the problem does not seem to happen - I would appreciate any feedback you are able to provide.
I am using the latest version of your component.
static void Main(string[] args)
{
OracleConnection oc = new OracleConnection();
oc.Server = "dev";
oc.UserId = "devuser";
oc.Password = "devpass";
oc.Open();
int n = 0;
while (true)
{
OracleCommand ocmd = new OracleCommand();
ocmd.Connection = oc;
ocmd.ParameterCheck = true;
ocmd.CommandType = System.Data.CommandType.Text;
ocmd.CommandText = "select * from dual";
ocmd.Prepare();
ocmd.Dispose();
n++;
if (n % 1000 == 0) Console.WriteLine("count=" + n.ToString());
}
}
Thanks
Darren
I am experiencing a significant memory leak when connecting to an Oracle 19 database using the Oracle 19.0.0.0.0 client.
The following code will replicate the issue and quickly consumes large amounts of memory. I have also tested this using an older Oracle 11.2.0.3.0 client with the same Oracle 19 database and the problem does not seem to happen - I would appreciate any feedback you are able to provide.
I am using the latest version of your component.
static void Main(string[] args)
{
OracleConnection oc = new OracleConnection();
oc.Server = "dev";
oc.UserId = "devuser";
oc.Password = "devpass";
oc.Open();
int n = 0;
while (true)
{
OracleCommand ocmd = new OracleCommand();
ocmd.Connection = oc;
ocmd.ParameterCheck = true;
ocmd.CommandType = System.Data.CommandType.Text;
ocmd.CommandText = "select * from dual";
ocmd.Prepare();
ocmd.Dispose();
n++;
if (n % 1000 == 0) Console.WriteLine("count=" + n.ToString());
}
}
Thanks
Darren