oracle / dotnet-db-samples

.NET code samples for Oracle database developers #OracleDotNet
http://otn.oracle.com/dotnet
MIT License
408 stars 190 forks source link

Cursor Overflow ODP.NET not fixed with 8.21.140 #385

Closed JK-404 closed 3 weeks ago

JK-404 commented 1 month ago

After upgrading the ODP.NET Version to 8.21.140 we still encountering the open cursor issue. We getting a lot of data once a day (about 8000 requests) after this there is nearly no traffic on the service. The cursors are staying open until the next day this repeats until the database cursor limit is exceeded.

Database: Oracle 19.17.0.0.0


  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <Nullable>enable</Nullable>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.1">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="Oracle.EntityFrameworkCore" Version="8.21.140" />
  </ItemGroup>

</Project>

Connection String CONNECTION_STRING: "Data Source=(DESCRIPTION=(ENABLE=BROKEN)(ADDRESS=(PROTOCOL=TCP)(HOST=www.wasserwerfer.com)(PORT=1541))(CONNECT_DATA=(SERVER=dedicated)(SERVICE_NAME=wasserwerfer)));User Id=((DB_USER));Password=((DB_PWD))"

alexkeh commented 1 month ago

@JK-404 For cursor leaks, we'll likely need at least the Oracle EF Core test case that reproduces the issue. Sometimes leaks are caused by a bug in the DB server, sometimes in the client driver, and sometimes in the app code that do not explicitly close/dispose objects they have completed their work with.

The challenge increases if the cursor leak requires a certain amount of load to occur.

It's generally easier if you open an Oracle Support service request in these situations if expediency is important. The Oracle analyst can examine your setup directly and conduct some diagnostics and review the code.

alexkeh commented 3 weeks ago

Closing for now. Will reopen once we get more diagnostics.