Calling Oracle from C#: Oracle error ORA-12571 encountered


I'm using Oracle.ManagedDataAccess.Core to access Oracle database from C#. The goal is to read pretty big set of data - it contains around 500k records. I'm doing it using data reader:

await using var reader = await command.ExecuteReaderAsync();
while (await reader.ReadAsync())
  // Do Stuff

With local server it works fine. But when I'm executing it against a remote server, after some time (approx 1 min) I'm getting

System.Exception: 'Oracle.ManagedDataAccess.Client.OracleException (0x80004005): Oracle error ORA-12571 encountered ---> OracleInternal.Network.NetworkException (0x80004005): Oracle error ORA-12571 encountered ---> System.Net.Sockets.SocketException (10053): An established connection was aborted by the software in your host machine. at OracleInternal.Network.TcpTransportAdapter.Send(OraBuf OB) at OracleInternal.Network.TcpTransportAdapter.Send(OraBuf OB) at OracleInternal.Network.WriterStream.Write(OraBuf OB)

Is it some kind of timeout issue? Does anyone know how to solve this? Maybe it's possible to read data not via reader, but the whole?

What I tried: OracleConnection has parameters KeepAlive, KeepAliveTime - none of them helped. OracleCommand has parameter CommandTimeout - doesn't help as well.

asked on Stack Overflow Dec 3, 2020 by berliner

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0