Page 1 of 1

Problems with large amounts of data ?

Posted: Mon 30 May 2011 14:26
by b_meyer
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.

Posted: Tue 31 May 2011 12:27
by AndreyR
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.

Posted: Tue 31 May 2011 12:32
by b_meyer
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: