Problems with large amounts of data ?

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
b_meyer
Posts: 2
Joined: Mon 30 May 2011 14:12

Problems with large amounts of data ?

Post by b_meyer » Mon 30 May 2011 14:26

Hi,

i am a user of your dotconnect Postgre Professional and i am using the provided code-first approach that is included in version 5.3.160.

I am currently trying to process approximately 20 million records.
When i execute my query, the following exception is raised:

{"Server did not respond within the specified timeout interval."}

Here is the stacktrace:

Code: Select all

   at Devart.Data.PostgreSql.PgSqlDataReader.e(Int32 A_0)
   at Devart.Data.PostgreSql.PgSqlCommand.InternalExecute(CommandBehavior behavior, IDisposable stmt, Int32 startRecord, Int32 maxRecords)
   at Devart.Common.DbCommandBase.InternalExecute(CommandBehavior behavior, IDisposable stmt, Int32 startRecord, Int32 maxRecords, Boolean nonQuery)
   at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
   at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
   at Devart.Data.PostgreSql.Entity.j.a(CommandBehavior A_0)
   at Devart.Common.Entity.b5.b(CommandBehavior A_0)
   at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
My question is if you product can deliver the required functionality.

Btw. queries which are returning max. 40-50 thousand records are working.

The postgre-server is processing the query when provided with the sql-statement generated by linq.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Tue 31 May 2011 12:27

I recommend you to increase the ObjectContext.CommandTimeout parameter (the default value is 30 seconds).
You can perform this using the following code snippet:

Code: Select all

context.CommandTimeout = 90;

As an alternative, you can set timeout to 0, then there will be no timeout check at all.
The same effect can be reached by modification of the Default Command Timeout connection string parameter.
If you need to update a large amount of records you might be interested in the Batch Updates functionality.

b_meyer
Posts: 2
Joined: Mon 30 May 2011 14:12

Post by b_meyer » Tue 31 May 2011 12:32

AndreyR wrote:I recommend you to increase the ObjectContext.CommandTimeout parameter (the default value is 30 seconds).
You can perform this using the following code snippet:

Code: Select all

context.CommandTimeout = 90;

As an alternative, you can set timeout to 0, then there will be no timeout check at all.
The same effect can be reached by modification of the Default Command Timeout connection string parameter.
If you need to update a large amount of records you might be interested in the Batch Updates functionality.
Thanks for your help, the solution is so simple that it should literally jump into ones face. :oops:

Post Reply