Error: The timeout period elapsed prior to completion of the operation or the server is not responding.

Posts   
 
    
greenstone
User
Posts: 132
Joined: 20-Jun-2007
# Posted on: 04-Nov-2012 01:39:46   

Hi,

Using LLBLGen 3.1 (.dlls 3.1.11.907 9-30-2011), using "adapter" with the llblgen run-time library.

I'm getting the error "The timeout period elapsed prior to completion of the operation or the server is not responding." when
1.) Opening a connection to a SQL Server database -- adapter.OpenConnection(); 2.) Starting a transaction -- adapter.CommandTimeOut = 0; adapter.StartTransaction(System.Data.IsolationLevel.ReadCommitted, "Employee Search Utility"); 3.) Inserting a millions of records for an entity type. 4.) Committing -- adapter.Commit(); Then the Commit appears to fail, so my code calls a rollback -- adapter.Rollback(); But this seems to fail and display the error message shown below.

I don't get this error if I'm only inserting some thousand of these entities.

Thoughts on how to resolve this issue?

Thanks!

Error: 'Couldn't load assembly :DatabaseUtility.Plugins.EmployeeSearch , class : DatabaseUtility.Plugins.EmployeeSearch.EmployeeSearch , method : ProcessEmployeeSearch due to: The following exception occured at Void OnError(System.Data.SqlClient.SqlException, Boolean):Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.The following exception occured at System.Object _InvokeMethodFast(System.IRuntimeMethodInfo, System.Object, System.Object[], System.SignatureStruct ByRef, System.Reflection.MethodAttributes, System.RuntimeType):Exception has been thrown by the target of an invocation.
Stack Trace:
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
   at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
   at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParserStateObject.ReadNetworkPacket()
   at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
   at System.Data.SqlClient.TdsParserStateObject.ReadByte()
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.TdsExecuteTransactionManagerRequest(Byte[]buffer, TransactionManagerRequestType request, String transactionName, TransactionManagerIsolationLevel isoLevel, Int32 timeout, SqlInternalTransaction transaction, TdsParserStateObject stateObj, Boolean isDelegateControlRequest)
   at System.Data.SqlClient.SqlInternalConnectionTds.ExecuteTransactionYukon(TransactionRequest transactionRequest, String transactionName, IsolationLevel iso,SqlInternalTransaction internalTransaction, Boolean isDelegateControlRequest)
   at System.Data.SqlClient.SqlInternalConnectionTds.ExecuteTransaction(TransactionRequest transactionRequest, String name, IsolationLevel iso, SqlInternalTransaction internalTransaction, Boolean isDelegateControlRequest)
   at System.Data.SqlClient.SqlInternalTransaction.Rollback()
   at System.Data.SqlClient.SqlTransaction.Rollback()
   at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.Rollback() in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\AdapterSpecific\DataAccessAdapterBase.cs:line 1027at Grb.DatabaseUtility.Plugins.EmployeeSearch.EmployeeSearch.ProcessEmployeeSearch(String databaseConnectionText, String frameworkSchema, String assistSchema, DatabaseType databaseType, ILogging logger) in c:\source\search\AssistWeb\DatabaseUtility\Plugins\Grb.DatabaseUtility.Plugins.EmployeeSearch\EmployeeSearch.cs:line 111   at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributesmethodAttributes, RuntimeType typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at DatabaseUtility.ProcessDatabaseByAction.ExecuteAssembly(String assemblyName, String className, String methodName, Object[] parametersForTheMethod) in c:\source\search\AssistWeb\DatabaseUtility\DatabaseUtility\ProcessDatabaseByAction.cs:line 830.' occurred while executing assembly.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 05-Nov-2012 03:43:43   
  • According to the stack trace the exception seems to be originated here at Grb.DatabaseUtility.Plugins.EmployeeSearch.ProcessEmployeeSearch, please post the code of that function.

  • Also the exception happens on the transaction.Rollback. Is that right?

  • Last but not least: you are using an old runtime library build, so please install the latest one.

David Elizondo | LLBLGen Support Team
greenstone
User
Posts: 132
Joined: 20-Jun-2007
# Posted on: 13-Nov-2012 16:16:03   

Thanks for the response, sorry for the delay. I wound up chunking this into smaller transactions, and it seems to work fine. Thanks for the help!