Page 1 of 1

Memory leak when connecting to oracle 19 client

Posted: Thu 07 Jan 2021 14:20
by DarrenColes
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

Re: Memory leak when connecting to oracle 19 client

Posted: Fri 08 Jan 2021 15:15
by Shalex
The bug with memory leak when running a lot of queries in the OCI mode is fixed. We are going to release a new public build next week. If you are interested in the internal build with the fix, contact us.

Re: Memory leak when connecting to oracle 19 client

Posted: Fri 15 Jan 2021 14:27
by Shalex
New build of dotConnect for Oracle 9.14.1180 is available for download now: viewtopic.php?f=1&t=44351.

Re: Memory leak when connecting to oracle 19 client

Posted: Wed 20 Jan 2021 16:23
by DarrenColes
thanks this release has resolved my issue