Application (DA) killing connection to database after a few minutes - Devart - PostgreSQL

After a components upgrade (Devart and RemObject) my application started killing the connection after a few minutes for no apparent reason.
Tests were done with the old version of Devart, but the same problem is still happening.

There has been no change in the connection settings with the bank, we are suspicious that RemObject is setting some internal timeout setting in Devart.

The settings are the same (connection to the bank, load / volume of data) for the following combinations of components:

======= Connection Settings =======

ConnectionDefinition conexaoBD = new ConnectionDefinition();
conexaoBD.Name = “ConexaoBD”;
conexaoBD.Pool.MaxPoolSize = 10;
conexaoBD.Pool.WaitTimeOut = 600;

conexaoBD.ConnectionString = “DEVART_POSTGRESQL.NET?”;
conexaoBD.ConnectionString += “Host=localhost”;
conexaoBD.ConnectionString += “;Port=5432”;
conexaoBD.ConnectionString += ";Database=postgres;
conexaoBD.ConnectionString += “;User Id=postgres”;
conexaoBD.ConnectionString += “;Password=postgres”;
conexaoBD.ConnectionString += “;Unicode=True;Persist Security Info=True;Schema=public;Pooling=false;UnpreparedExecute=true;Max Pool Size=100;Connection Timeout=15;Default Command Timeout=0;”;
conexaoBD.Default = true;

connectionManager.ConnectionDefinitions.Add(conexaoBD);

connectionManager.PoolingBehavior = RemObjects.SDK.Pooling.PoolBehavior.RaiseError;
connectionManager.PoolTransactionBehaviour = PoolTransactionBehaviour.Rollback;
connectionManager.WaitIntervalSeconds = 10;
connectionManager.PoolingEnabled = false;
connectionManager.MaxPoolSize = 5;
connectionManager.ConnectionPoolTimeout = 600;

======= Components =======

  • Success

  • Devart: 7.7.819.0 or higher

  • RemObjects Data Abstract for .NET, Server Edition - 9.1.99.1273

  • PostgreSQL 10.3

  • Error

  • Devart: 7.7.819.0 or higher

  • RemObjects Data Abstract for .NET, Server Edition - 9.4.109.1377

  • PostgreSQL 10.3

  • This set of components generate the error described below

======= Application log =======

Devart.Data.PostgreSql.PgSqlException (0x80004005): Server did not respond within the specified timeout interval. —> System.TimeoutException: Server did not respond within the specified timeout interval. —> System.IO.IOException: Unable to read transport connection data: A connection attempt failed because the connected component did not respond
correctly after a period of time or the established connection failed
because the connected host did not respond. —> System.Net.Sockets.SocketException:A connection attempt failed because the connected component did not respond
correctly after a period of time or the established connection failed
because the connected host did not respond
em System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
em System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
— Fim do rastreamento de pilha de exceções internas —
em System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
em Devart.Common.z.a(Byte[] A_0, Int32 A_1, Int32 A_2)
— Fim do rastreamento de pilha de exceções internas —
em Devart.Common.z.a(Byte[] A_0, Int32 A_1, Int32 A_2)
em Devart.Common.f.c(Byte[] A_0, Int32 A_1, Int32 A_2)
em Devart.Common.n.d(Byte[] A_0, Int32 A_1, Int32 A_2)
em Devart.Data.PostgreSql.PgSqlDataReader.f(Int32 A_0)
em Devart.Data.PostgreSql.PgSqlCommand.InternalExecute(CommandBehavior behavior, IDisposable stmt, Int32 startRecord, Int32 maxRecords)
em Devart.Common.DbCommandBase.InternalExecute(CommandBehavior behavior, IDisposable stmt, Int32 startRecord, Int32 maxRecords, Boolean nonQuery)
em Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
em Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
em System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()

======= PostgreSQL log =======
2018-10-25 14:05:58.432 -03 [12688] LOG: could not receive data from client: An existing connection was forcibly closed by the remote host.
2018-10-25 14:05:58.433 -03 [6604] LOG: could not receive data from client: An existing connection was forcibly closed by the remote host.
2018-10-25 14:06:26.291 -03 [13196] LOG: could not send data to client: An existing connection was forcibly closed by the remote host.
2018-10-25 14:06:26.291 -03 [13196] FATAL: connection to client lost

Is there any configuration of transaction / connection timeout or something of the type that implicitly changed in this new version of RemObjects?

Hello

Check the ConnectionTimeout property of the Data Service. It behavior has been fixed in one of these builds (before the fix this property’s value has been ignored for some queries)

Hope that helps

Hello,

Thanks for the feedback, we did the reconfiguration of the ConnectionTimeout property and it worked.

Thank you